New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nil Value for type: Integer Does Not Return Error #622
Comments
You POST this via JSON? Is it different when it's in the URL query string? Would appreciate a failing test in Grape if you have a moment. |
Just pushed a pull request with a failing test: On Tue, Apr 8, 2014 at 4:11 AM, Daniel Doubrovkine (dB.) @dblockdotorg <
|
I think nil is still a valid value, I think a validation would make more sense requires :foo, allow_nil: true What if grape did not have param :foo, allow_nil: true, presence: true |
btw, you can use requires :id, type: Integer, allow_blank: true #default |
@dm1try is right on, modified specs with |
Using 0.7.1, If I set
And then I pass in
Grape does not detect an error.
The text was updated successfully, but these errors were encountered: