Class: ActiveModel::Validations::IbanFormatValidator
- Inherits:
-
EachValidator
- Object
- EachValidator
- ActiveModel::Validations::IbanFormatValidator
- Defined in:
- lib/validates_iban_format_of/active_model.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
7 8 9 10 11 |
# File 'lib/validates_iban_format_of/active_model.rb', line 7 def validate_each(record, attribute, value) (ValidatesIbanFormatOf::validate_iban_format(value, .merge(generate_message: true)) || []).each do |error| record.errors.add(attribute, error) end end |