class IbanValidator

Public Instance Methods

validate_each(record, attribute, value) click to toggle source
# File lib/polish_validators_rails.rb, line 6
def validate_each(record, attribute, value)
  validator = ::PolishValidators::IbanValidator.new(value)
  record.errors.add(attribute, @options[:message] || 'Invalid IBAN format') unless validator.valid?
end