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 does not work #733

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

cs0511
Copy link
Contributor

@cs0511 cs0511 commented Jan 4, 2022

Current code only checks when allow_blank is true, it doesn't check if allow_blank is false.

If an attribute allows String, but doesn't want to allow empty string, allow_blank doesn't work at all.

@stevehanson
Copy link
Contributor

stevehanson commented Mar 3, 2022

This would be useful on my project as well. We have been having to use regex types (eg. /.*\S.*/) instead of String in order to validate that the string is not blank.

@mathieujobin
Copy link
Collaborator

I think I have been bitten by this once as well...
but 3 tests are failing for rails 4.2
unless we can fix them, it means we would remove support and cut a major version

@mathieujobin mathieujobin merged commit 5f75677 into Apipie:master Mar 29, 2022
@cs0511 cs0511 deleted the allow_blank_does_not_work branch September 6, 2022 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants