class ActiveModel::Validations::EmailFormatValidator

Public Instance Methods

validate_each(record, attribute, value) click to toggle source
# File lib/validates_email_format_of/active_model.rb, line 11
def validate_each(record, attribute, value)
  (ValidatesEmailFormatOf::validate_email_format(value, options.merge(:generate_message => true)) || []).each do |error|
    record.errors.add(attribute, error)
  end
end