class Validator::Nric::NricValidator

Public Instance Methods

validate_each(record, attribute, value) click to toggle source
# File lib/validator/nric/nric_validator.rb, line 4
def validate_each(record, attribute, value)
  record.errors[attribute] << (options[:message] || 'is not an NRIC') \
    unless Validator::Nric.check(value)
end