class MxWithFallbackValidator

Public Instance Methods

validate_each(record,attribute,value) click to toggle source
# File lib/valid_email/mx_with_fallback_validator.rb, line 4
def validate_each(record,attribute,value)
  r = ValidateEmail.mx_valid_with_fallback?(value)
  record.errors.add attribute, (options[:message] || I18n.t(:invalid, :scope => "valid_email.validations.email")) unless r

  r
end