Commit 99f1385e authored by Grzegorz Bizon's avatar Grzegorz Bizon Committed by Kamil Trzcinski

Restore validation of CI job environment name

parent 2ad7753d
......@@ -18,6 +18,15 @@ module Gitlab
end
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
validates :config, allowed_keys: ALLOWED_KEYS
......
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