Class: ModestModel::Validators::AbsenceValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- ModestModel::Validators::AbsenceValidator
- Defined in:
- lib/modest_model/validators.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
4 5 6 |
# File 'lib/modest_model/validators.rb', line 4 def validate_each(record, attribute, value) record.errors.add(attribute, :invalid, ) unless value.blank? end |