instance method
validate
Ruby on Rails 6.1.7.10
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 122
def validate(record)
raise NotImplementedError, "Subclasses must implement a validate(record) method."
end
Defined in activemodel/lib/active_model/validator.rb line 122
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Validator