diff options
author | Rémy Coutable <remy@rymai.me> | 2016-02-09 15:51:06 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-02-09 18:15:35 +0100 |
commit | b34963bc125d11af7b9c993d1233258f084e580d (patch) | |
tree | a428e07d6da540a852a1f182073e16ee317546da /app/models/member.rb | |
parent | a52c5778bb9d95097cc965539731a2ef846c3ff0 (diff) | |
download | gitlab-ce-b34963bc125d11af7b9c993d1233258f084e580d.tar.gz |
Validate email addresses using Devise.email_regexp
Also:
- Get rid of legacy :strict_mode
- Get rid of custom :email validator
- Add some shared examples to spec emails validation
Diffstat (limited to 'app/models/member.rb')
-rw-r--r-- | app/models/member.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/member.rb b/app/models/member.rb index 34efcd0088d..0b6785ddbc5 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -38,8 +38,8 @@ class Member < ActiveRecord::Base presence: { if: :invite? }, - email: { - strict_mode: true, + format: { + with: Devise.email_regexp, allow_nil: true }, uniqueness: { |