Sha256: 4884a2f1788b653a6bb4b59afe46ac0b51ac539cf132369a6e1513bbeac8004a
Contents?: true
Size: 252 Bytes
Versions: 1
Compression:
Stored size: 252 Bytes
Contents
module IbanValidation class IbanValidator < ActiveModel::EachValidator def validate_each(record, attribute, values) unless IBANTools::IBAN.valid? values record.errors.add attribute, 'is not a valid IBAN' end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
iban_validation-0.0.1 | lib/iban_validation/iban_validator.rb |