diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-28 03:08:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-28 03:08:34 +0300 |
commit | d690a8d62bc0abd5ab937822ff7a1b9f1e7b1a91 (patch) | |
tree | cede6bf5f7560522c7917378f8c09439b267a6e7 /app/models/container_expiration_policy.rb | |
parent | d440531cf8d33834541da20aa2427c726d39e5ef (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/container_expiration_policy.rb')
-rw-r--r-- | app/models/container_expiration_policy.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/container_expiration_policy.rb b/app/models/container_expiration_policy.rb index 3f91f6c796a..0441a5f0f5b 100644 --- a/app/models/container_expiration_policy.rb +++ b/app/models/container_expiration_policy.rb @@ -21,6 +21,7 @@ class ContainerExpirationPolicy < ApplicationRecord validates :cadence, presence: true, inclusion: { in: ->(_) { self.cadence_options.stringify_keys } } validates :older_than, inclusion: { in: ->(_) { self.older_than_options.stringify_keys } }, allow_nil: true validates :keep_n, inclusion: { in: ->(_) { self.keep_n_options.keys } }, allow_nil: true + validates :name_regex, presence: true, if: :enabled? validates :name_regex, untrusted_regexp: true, if: :enabled? validates :name_regex_keep, untrusted_regexp: true, if: :enabled? |