class JanValidator
Constants
- VERSION
Public Instance Methods
validate_each(record, attribute, value)
click to toggle source
# File lib/jan_validator.rb, line 5 def validate_each(record, attribute, value) record.errors.add(attribute, "is invalid length") unless Jan::Validator.validate_size(value) record.errors.add(attribute, "is invalid check-digit") unless Jan::Validator.validate_check_digit(value) end