Sha256: d93812647dd86aada56e6a4cce4d4663e537c29b5dce46f5e71105a50371b997
Contents?: true
Size: 240 Bytes
Versions: 1
Compression:
Stored size: 240 Bytes
Contents
module BicValidation class BicValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) unless Bic.new(value).valid? record.errors.add attribute, 'is not a valid BIC' end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bic_validation-0.0.2 | lib/bic_validation/bic_validator.rb |