mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 07:01:13 +08:00
FIX: email regexp for older rubies
This commit is contained in:
@ -22,7 +22,7 @@ class EmailValidator < ActiveModel::EachValidator
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.email_regex
|
def self.email_regex
|
||||||
/^[a-zA-Z0-9!#$%&'*+\/=?\^_`{|}~\-]+(?:\.[a-zA-Z0-9!#$%&'\*+\/=?\^_`{|}~\-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/
|
/^[a-zA-Z0-9!#\$%&'*+\/=?\^_`{|}~\-]+(?:\.[a-zA-Z0-9!#\$%&'\*+\/=?\^_`{|}~\-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
Reference in New Issue
Block a user