[Fix #1479] Remove unused email format validator
This commit is contained in:
parent
5650c4aefe
commit
ba3b0b4687
1 changed files with 0 additions and 10 deletions
|
@ -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
|
|
Loading…
Reference in a new issue