Commit 249d9851942d05f1d04336c360ca0ec72d2ca677

Authored by Vasiliy Ermolovich
2 parents ef9dfa7c 2dd78f36
Exists in master and in 1 other branch production

Merge pull request #594 from errbit/fix_regexp

Dont use ^ and $ on email_regexp
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
config/initializers/devise.rb
@@ -132,7 +132,7 @@ Devise.setup do |config| @@ -132,7 +132,7 @@ Devise.setup do |config|
132 # one (and only one) @ exists in the given string. This is mainly 132 # one (and only one) @ exists in the given string. This is mainly
133 # to give user feedback and not to assert the e-mail validity. 133 # to give user feedback and not to assert the e-mail validity.
134 # config.email_regexp = /\A[^@]+@[^@]+\z/ 134 # config.email_regexp = /\A[^@]+@[^@]+\z/
135 - config.email_regexp = /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i 135 + config.email_regexp = /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
136 136
137 # ==> Configuration for :timeoutable 137 # ==> Configuration for :timeoutable
138 # The time you want to timeout the user session without activity. After this 138 # The time you want to timeout the user session without activity. After this