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