Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-02-09 19:59:47 +0300
committerRémy Coutable <remy@rymai.me>2016-02-09 20:15:35 +0300
commitb3635ee46a1e62d72ce84871e2a5984e6eabfbdf (patch)
treeda9f077646a7baa0b0aee9f7c2412fe271ac9814 /app/models/email.rb
parentb34963bc125d11af7b9c993d1233258f084e580d (diff)
Re-add EmailValidator to avoid the repetition of format: { with: Devise.email_regexp }
Diffstat (limited to 'app/models/email.rb')
-rw-r--r--app/models/email.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/email.rb b/app/models/email.rb
index daa259ee2d2..b323d1edd10 100644
--- a/app/models/email.rb
+++ b/app/models/email.rb
@@ -15,7 +15,7 @@ class Email < ActiveRecord::Base
belongs_to :user
validates :user_id, presence: true
- validates :email, presence: true, uniqueness: true, format: { with: Devise.email_regexp }
+ validates :email, presence: true, uniqueness: true, email: true
validate :unique_email, if: ->(email) { email.email_changed? }
before_validation :cleanup_email