summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-02-09 17:59:47 +0100
committerRémy Coutable <remy@rymai.me>2016-02-09 18:15:35 +0100
commitb3635ee46a1e62d72ce84871e2a5984e6eabfbdf (patch)
treeda9f077646a7baa0b0aee9f7c2412fe271ac9814 /app/models/user.rb
parentb34963bc125d11af7b9c993d1233258f084e580d (diff)
downloadgitlab-ce-streamline-email-validation.tar.gz
Re-add EmailValidator to avoid the repetition of format: { with: Devise.email_regexp }streamline-email-validation
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index edda0ebef86..9fe94b13e52 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -146,8 +146,8 @@ class User < ActiveRecord::Base
# Validations
#
validates :name, presence: true
- validates :notification_email, presence: true, format: { with: Devise.email_regexp }
- validates :public_email, presence: true, uniqueness: true, format: { with: Devise.email_regexp }, allow_blank: true
+ validates :notification_email, presence: true, email: true
+ validates :public_email, presence: true, uniqueness: true, email: true, allow_blank: true
validates :bio, length: { maximum: 255 }, allow_blank: true
validates :projects_limit, presence: true, numericality: { greater_than_or_equal_to: 0 }
validates :username,