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

InputRequired send error only when data is None #844

Closed

Conversation

antoniosobrinho
Copy link

InputRequired return error when data is False or 0.

If my data is a Int or a Bool and I need them to be required, InputRequired return error if I send False or 0, but I send the data.

This fix check only if data is None, so, if the data exists

@Daverball
Copy link

Daverball commented May 16, 2024

raw_data should always be a list of strings (or file uploads, the representation of which depends on if you use Webob, Werkzeug or something else to parse your POST/GET formdata), essentially whatever MultiDict.getlist returns, if you pass in something else then you are not using the library correctly.

DataRequired actually has the issue you're trying to fix here, but InputRequired does not.

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

Successfully merging this pull request may close these issues.

None yet

2 participants