Commit 258ea127 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'nicolasdular/change-regex-error-wording' into 'master'

Change wording for sign up regex restrictions

See merge request gitlab-org/gitlab!28064
parents cc68c842 8bede438
...@@ -1825,7 +1825,7 @@ class User < ApplicationRecord ...@@ -1825,7 +1825,7 @@ class User < ApplicationRecord
return if restrictions.blank? return if restrictions.blank?
if Gitlab::UntrustedRegexp.new(restrictions).match?(email) 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
end end
......
...@@ -24067,7 +24067,7 @@ msgstr "" ...@@ -24067,7 +24067,7 @@ msgstr ""
msgid "is not a valid X509 certificate." msgid "is not a valid X509 certificate."
msgstr "" 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 "" msgstr ""
msgid "is not an email you own" msgid "is not an email you own"
......
...@@ -529,7 +529,7 @@ describe User, :do_not_mock_admin_mode do ...@@ -529,7 +529,7 @@ describe User, :do_not_mock_admin_mode do
user = build(:user, email: 'info@gitlab.com') user = build(:user, email: 'info@gitlab.com')
expect(user).not_to be_valid 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 end
it 'does accept a valid email address' do it 'does accept a valid email address' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment