class EmailValidator
Public Instance Methods
validate_each(record, attribute, value)
click to toggle source
# File lib/credible_email/email_validator.rb, line 2 def validate_each(record, attribute, value) unless value =~ /.+@\S+\.\S+/ record.errors[attribute] << (options[:message] || 'is not a valid email') end end