include?(attribute)
Instance Public methods
Returns true
if the error messages include an error for the
given key attribute
, false
otherwise.
person.errors.messages # => {:name=>["cannot be nil"]} person.errors.include?(:name) # => true person.errors.include?(:age) # => false
Please login to continue.