diff options
author | Rémy Coutable <remy@rymai.me> | 2016-02-09 17:59:47 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-02-09 18:15:35 +0100 |
commit | b3635ee46a1e62d72ce84871e2a5984e6eabfbdf (patch) | |
tree | da9f077646a7baa0b0aee9f7c2412fe271ac9814 /app/models/user.rb | |
parent | b34963bc125d11af7b9c993d1233258f084e580d (diff) | |
download | gitlab-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.rb | 4 |
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, |