module ActiveModel::Validations

def errors

person.errors # => #
person.valid? # => false
person = Person.new

end
validates_presence_of :name
attr_accessor :name

include ActiveModel::Validations
class Person

error messages.
Returns the +Errors+ object that holds all information about attribute
def errors
  @errors ||= Errors.new(self)
end