summaryrefslogtreecommitdiff
path: root/app/models/application_setting.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-02-09 15:51:06 +0100
committerRémy Coutable <remy@rymai.me>2016-02-09 18:15:35 +0100
commitb34963bc125d11af7b9c993d1233258f084e580d (patch)
treea428e07d6da540a852a1f182073e16ee317546da /app/models/application_setting.rb
parenta52c5778bb9d95097cc965539731a2ef846c3ff0 (diff)
downloadgitlab-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/application_setting.rb')
-rw-r--r--app/models/application_setting.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index fa48fe5b9e4..ac6653f5d50 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -71,8 +71,8 @@ class ApplicationSetting < ActiveRecord::Base
url: true
validates :admin_notification_email,
- allow_blank: true,
- email: true
+ format: { with: Devise.email_regexp },
+ allow_blank: true
validates :two_factor_grace_period,
numericality: { greater_than_or_equal_to: 0 }