diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-25 03:08:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-25 03:08:34 +0300 |
commit | 1e6730a4e32f6cbf4b84aa9fc13204778783f33c (patch) | |
tree | 6dd6c9ed98ec836432cf431397a4ef45dd78deb8 /app/models/service_desk_setting.rb | |
parent | 95a48f11db963bc55ab918e3eb24f8576dca4a81 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/service_desk_setting.rb')
-rw-r--r-- | app/models/service_desk_setting.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/service_desk_setting.rb b/app/models/service_desk_setting.rb index c5203354b9d..1c854cc9941 100644 --- a/app/models/service_desk_setting.rb +++ b/app/models/service_desk_setting.rb @@ -8,7 +8,10 @@ class ServiceDeskSetting < ApplicationRecord validate :valid_issue_template validate :valid_project_key validates :outgoing_name, length: { maximum: 255 }, allow_blank: true - validates :project_key, length: { maximum: 255 }, allow_blank: true, format: { with: /\A[a-z0-9_]+\z/ } + validates :project_key, + length: { maximum: 255 }, + allow_blank: true, + format: { with: /\A[a-z0-9_]+\z/, message: -> (setting, data) { _("can contain only lowercase letters, digits, and '_'.") } } scope :with_project_key, ->(key) { where(project_key: key) } |