Method: ActiveModel::Validator#validate
- Defined in:
- activemodel/lib/active_model/validator.rb
#validate(record) ⇒ Object
Override this method in subclasses with validation logic, adding errors to the records errors
array where necessary.
122 123 124 |
# File 'activemodel/lib/active_model/validator.rb', line 122 def validate(record) raise NotImplementedError, "Subclasses must implement a validate(record) method." end |