Skip to content
Browse files

Change email validation regex

  • Loading branch information...
1 parent cef99cf commit dce6cda526a0b9d3426248e8277bdac0d52e7a34 @dskecse committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/user.rb
View
2 app/models/user.rb
@@ -1,5 +1,5 @@
class User < ActiveRecord::Base
- VALID_EMAIL_REGEX = /\A[\w+\-.]+@([a-z\d\-]+\.?)+[^.]\.[a-z]+\z/i
+ VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-]+(?:\.[a-z\d\-]+)*\.[a-z]+\z/i
before_save { email.downcase! }

0 comments on commit dce6cda

Please sign in to comment.
Something went wrong with that request. Please try again.