BigW Consortium Gitlab

email_validator.rb 185 Bytes
Newer Older
1 2 3 4 5
class EmailValidator < ActiveModel::EachValidator
  def validate_each(record, attribute, value)
    record.errors.add(attribute, :invalid) unless value =~ Devise.email_regexp
  end
end