Class: API::Validations::Validators::BulkImports::DestinationSlugPath
- Inherits:
-
Grape::Validations::Validators::Base
- Object
- Grape::Validations::Validators::Base
- API::Validations::Validators::BulkImports::DestinationSlugPath
- Defined in:
- lib/api/validations/validators/bulk_imports.rb
Instance Method Summary collapse
Instance Method Details
#validate_param!(attr_name, params) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/api/validations/validators/bulk_imports.rb', line 8 def validate_param!(attr_name, params) return if Gitlab::Regex.oci_repository_path_regex.match?(params[attr_name]) raise Grape::Exceptions::Validation.new( params: [@scope.full_name(attr_name)], message: "#{Gitlab::Regex.} " \ "For example, 'destination_namespace' not 'destination/namespace'" ) end |