We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Used Cerberus version / latest commit: cerberus-1.2
Nullable is ignored
In [1]: from cerberus import Validator In [2]: client_schema = {'client': { ...: 'type': 'string', ...: 'nullable': True, ...: 'required': False, ...: 'allowed': ['browser', 'app', 'app_ios', 'app_android'], ...: }, ...: } In [3]: client_body = {'client': None} In [4]: v = Validator(client_schema) In [5]: v.validate(client_body) Out[5]: False In [6]: v.errors Out[6]: {'client': ['unallowed value None']}
The text was updated successfully, but these errors were encountered:
well, but allowed isn't ignored and does its job. add None to its constraint and everything is good.
allowed
None
Sorry, something went wrong.
:) thanks 👍
No branches or pull requests
Used Cerberus version / latest commit: cerberus-1.2
Use-case abstract
Nullable is ignored
Support request / Bug report
The text was updated successfully, but these errors were encountered: