Method: Apes::Validators::BaseValidator#validate_each
- Defined in:
- lib/apes/validators.rb
#validate_each(model, attribute, value) ⇒ Object
Perform validation on a attribute of a model.
16 17 18 19 20 21 22 23 24 |
# File 'lib/apes/validators.rb', line 16 def validate_each(model, attribute, value) checked = check_valid?(value) return checked if checked = [:message] || [:default_message] destination = [:additional] ? model.additional_errors : model.errors destination[attribute] << nil end |