class BsbNumberValidator
Public Instance Methods
Source
# File lib/bsb_number_validator.rb, line 6 def validate_each(record, attribute, value) record.errors.add(attribute, :invalid) unless value.nil? || BSB.lookup(value) end
# File lib/bsb_number_validator.rb, line 6 def validate_each(record, attribute, value) record.errors.add(attribute, :invalid) unless value.nil? || BSB.lookup(value) end