8
9
10
11
12
13
14
15
16
17
|
# File 'lib/api/validations/validators/bulk_imports.rb', line 8
def validate_param!(attr_name, params)
return if params[attr_name] =~ Gitlab::Regex.oci_repository_path_regex
raise Grape::Exceptions::Validation.new(
params: [@scope.full_name(attr_name)],
message: "#{Gitlab::Regex.oci_repository_path_regex_message} " \
"It can only contain alphanumeric characters, periods, underscores, and dashes. " \
"For example, 'destination_namespace' not 'destination/namespace'"
)
end
|