diff options
Diffstat (limited to 'lib/api/validations/validators/limit.rb')
-rw-r--r-- | lib/api/validations/validators/limit.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/validations/validators/limit.rb b/lib/api/validations/validators/limit.rb index 3bb4cee1d75..e8f894849a5 100644 --- a/lib/api/validations/validators/limit.rb +++ b/lib/api/validations/validators/limit.rb @@ -9,9 +9,10 @@ module API return if value.size <= @option - raise Grape::Exceptions::Validation, + raise Grape::Exceptions::Validation.new( params: [@scope.full_name(attr_name)], message: "#{@scope.full_name(attr_name)} must be less than #{@option} characters" + ) end end end |