Skip to content
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

allow_blank defaults to false ? #2075

Closed
dramalho opened this issue Jun 25, 2020 · 4 comments
Closed

allow_blank defaults to false ? #2075

dramalho opened this issue Jun 25, 2020 · 4 comments
Labels

Comments

@dramalho
Copy link

dramalho commented Jun 25, 2020

Hi guys

I've done a recent update and this kinda went bellow the spec radar - not anymore - until I saw some real life examples. I have one particular endpoint that's used externally - so I have little control over that - where I saw that a lot of optional params were being passed empty - param1=&param2=&param3=annoy-david and those were getting hit with 400 ({"error"=>{"type"=>"invalid_parameter", "message"=>"does not have a valid value"}}) so I tracked it down do allow_blank defaulting to false (the quick fix was really adding allow_blank: true on all my optional parameters).

I think the change that did it - possibly - was this . The documentation doesn't hint at this, in fact the only reference to allow_blank is with two examples of when to use allow_blank: false - so I'm a bit confused here on what's the intention or if I'm just being thick (totally valid :) )

I upgraded from 1.2.5 to 1.3.2 - that's worth mentioning

@dblock
Copy link
Member

dblock commented Jun 25, 2020

It's possible that #2067 has fixed this. Can you please confirm against HEAD? If it doesn't work, try writing a spec.

@dblock dblock added the bug? label Jun 25, 2020
@dramalho
Copy link
Author

Maybe indirectly, but easy to test anyway - I'll do that

@dramalho
Copy link
Author

That's it , I removed all the allow_blank: trues that I added, updated the gem, all is green . Any idea when it'll be officially released?

And thanks Daniel :)

@dblock
Copy link
Member

dblock commented Jun 25, 2020

Add +1 to #2030.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants