Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update e-mail regex to be compatible with new gTLDs #370

Merged
merged 1 commit into from Jul 26, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/authlogic/regex.rb
Expand Up @@ -12,11 +12,11 @@ def self.email
@email_regex ||= begin
email_name_regex = '[A-Z0-9_\.%\+\-\']+'
domain_head_regex = '(?:[A-Z0-9\-]+\.)+'
domain_tld_regex = '(?:[A-Z]{2,4}|museum|travel)'
domain_tld_regex = '(?:[A-Z]{2,4}|museum|travel|онлайн)'
/\A#{email_name_regex}@#{domain_head_regex}#{domain_tld_regex}\z/i
end
end

# A simple regular expression that only allows for letters, numbers, spaces, and .-_@. Just a standard login / username
# regular expression.
def self.login
Expand Down