[Fix #1479] Remove unused email format validator

This commit is contained in:
Mathieu Magnin 2018-02-26 14:51:25 +01:00
parent 5650c4aefe
commit ba3b0b4687

View file

@ -1,10 +0,0 @@
class EmailFormatValidator < ActiveModel::Validator
def email_regex
/\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
end
def validate(record)
return if record.email.blank?
record.errors[:base] << "Email invalide" if !email_regex.match(record.email)
end
end