From 8bede43851fb80772af41d55b0bcd2322407e7d6 Mon Sep 17 00:00:00 2001
From: nicolasdular <ndular@gitlab.com>
Date: Thu, 26 Mar 2020 00:34:49 +0100
Subject: [PATCH] Change wording for sign up regex restrictions

---
 app/models/user.rb       | 2 +-
 locale/gitlab.pot        | 2 +-
 spec/models/user_spec.rb | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/models/user.rb b/app/models/user.rb
index 8709bfb18fd..b147c7d4d48 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1825,7 +1825,7 @@ class User < ApplicationRecord
     return if restrictions.blank?
 
     if Gitlab::UntrustedRegexp.new(restrictions).match?(email)
-      errors.add(:email, _('is not allowed for sign-up'))
+      errors.add(:email, _('is not allowed. Try again with a different email address, or contact your GitLab admin.'))
     end
   end
 
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 80f16fd3e1d..9eabbb9f30a 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -24028,7 +24028,7 @@ msgstr ""
 msgid "is not a valid X509 certificate."
 msgstr ""
 
-msgid "is not allowed for sign-up"
+msgid "is not allowed. Try again with a different email address, or contact your GitLab admin."
 msgstr ""
 
 msgid "is not an email you own"
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index b7abcb31321..608e3a6e938 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -529,7 +529,7 @@ describe User, :do_not_mock_admin_mode do
             user = build(:user, email: 'info@gitlab.com')
 
             expect(user).not_to be_valid
-            expect(user.errors.messages[:email].first).to eq(_('is not allowed for sign-up'))
+            expect(user.errors.messages[:email].first).to eq(_('is not allowed. Try again with a different email address, or contact your GitLab admin.'))
           end
 
           it 'does accept a valid email address' do
-- 
2.30.9