class Mongoid::Validatable::AssociatedValidator

Validates whether or not an association is valid or not. Will correctly handle has one and has many associations.

@example Set up the association validations.

class Person
  include Mongoid::Document
  embeds_one :name
  embeds_many :addresses

  validates_associated :name, :addresses
end