Class: ActiveModel::Validations::TfnValidator
- Inherits:
-
EachValidator
- Object
- EachValidator
- ActiveModel::Validations::TfnValidator
- Defined in:
- lib/validates_for_australia/tfn_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
6 7 8 |
# File 'lib/validates_for_australia/tfn_validator.rb', line 6 def validate_each(record, attribute, value) record.errors[attribute] << "is not valid" unless valid_tfn?(value) end |