Restore validation of CI job environment name
This commit is contained in:
parent
2ad7753d34
commit
99f1385ee0
|
@ -18,6 +18,15 @@ module Gitlab
|
||||||
end
|
end
|
||||||
|
|
||||||
validates :name, presence: true
|
validates :name, presence: true
|
||||||
|
validates :name,
|
||||||
|
type: {
|
||||||
|
with: String,
|
||||||
|
message: Gitlab::Regex.environment_name_regex_message }
|
||||||
|
|
||||||
|
validates :name,
|
||||||
|
format: {
|
||||||
|
with: Gitlab::Regex.environment_name_regex,
|
||||||
|
message: Gitlab::Regex.environment_name_regex_message }
|
||||||
|
|
||||||
with_options if: :hash? do
|
with_options if: :hash? do
|
||||||
validates :config, allowed_keys: ALLOWED_KEYS
|
validates :config, allowed_keys: ALLOWED_KEYS
|
||||||
|
|
Loading…
Reference in New Issue