1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Changed the e-mail validation regex

This commit is contained in:
Rodrigo Flores 2011-04-18 21:39:29 +08:00 committed by Rodrigo Flores
parent 0e657eece1
commit 0b598cf132

View file

@ -10,6 +10,7 @@ module Devise
autoload :PathChecker, 'devise/path_checker'
autoload :Schema, 'devise/schema'
autoload :TestHelpers, 'devise/test_helpers'
autoload :EmailAddressValidation, 'devise/email'
module Controllers
autoload :Helpers, 'devise/controllers/helpers'
@ -91,9 +92,12 @@ module Devise
mattr_accessor :http_authentication_realm
@@http_authentication_realm = "Application"
# Email regex used to validate email formats. Adapted from authlogic.
# Email regex used to validate email formats. Based on RFC 822 and retrieved from
# Sixarm email validation gem
# (https://github.com/SixArm/sixarm_ruby_email_address_validation).
include EmailAddressValidation
mattr_accessor :email_regexp
@@email_regexp = /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
@@email_regexp = EMAIL_ADDRESS_EXACT_PATTERN
# Range validation for password length
mattr_accessor :password_length