Class: ActiveModel::Validations::TfnValidator

Inherits:
EachValidator
  • Object
show all
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