21
22
23
24
25
26
27
28
29
30
|
# File 'lib/api/validations/validators/bulk_imports.rb', line 21
def validate_param!(attr_name, params)
return if params[attr_name].blank?
return if NamespacePathValidator.valid_path?(params[attr_name])
raise Grape::Exceptions::Validation.new(
params: [@scope.full_name(attr_name)],
message: "must be a relative path and not include protocol, sub-domain, or domain information. " \
"For example, 'destination/full/path' not 'https://example.com/destination/full/path'"
)
end
|