instance method
validate
Ruby on Rails 3.0.20
Since v3.0.20Signature
validate(record)
Override this method in subclasses with validation logic, adding errors to the records errors array where necessary.
Parameters
-
recordreq
Source
# File activemodel/lib/active_model/validator.rb, line 124
def validate(record)
raise NotImplementedError
end
Defined in activemodel/lib/active_model/validator.rb line 124
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Validator