class SEPA::IBANValidator
Constants
- REGEX
IBAN2007Identifier (taken from schema)
Public Instance Methods
validate(record)
click to toggle source
# File lib/sepa_king/validator.rb, line 8 def validate(record) field_name = options[:field_name] || :iban value = record.send(field_name).to_s record.errors.add(field_name, :invalid, message: options[:message]) unless value.match(REGEX) end