You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
There is a defect about validation, for example:
WHEN
params: some_name do
xxx
requires :some_symbol, type: Grape::API::Boolean, allow_blank: false
xxx
end
THEN
send the request with some_symbol = false
GOT
a bad request with "error": "some_name[some_symbol] is empty"
This happened when allow_blank is false
Best regards,
Zhijia
The text was updated successfully, but these errors were encountered:
I've noticed this too. I believe it's because the allow_blank validator is using the rails present? method which will treat false as not present and therefore fail the validation.
Hi there,
There is a defect about validation, for example:
WHEN
params: some_name do
xxx
requires :some_symbol, type: Grape::API::Boolean, allow_blank: false
xxx
end
THEN
send the request with some_symbol = false
GOT
a bad request with "error": "some_name[some_symbol] is empty"
This happened when allow_blank is false
Best regards,
Zhijia
The text was updated successfully, but these errors were encountered: