Class: MdsVersionValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- MdsVersionValidator
- Defined in:
- app/validators/mds_version_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
3 4 5 |
# File 'app/validators/mds_version_validator.rb', line 3 def validate_each(record, attribute, value) record.errors[attribute] << "This assessment has the wrong version of items according to the target date of #{record.reference_date.to_s}." unless valid_version?(record, value) end |