We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
false
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
core
5.x
Given the following schema:
{ "type": "number", "if": { "const": 13 }, "then": false }
Value 13 is a valid value.
13
In JSON Schema, false equals {"not": {}} link to spec
{"not": {}}
Thus, the schema above with value 13 should be invalid.
Expected: validation fails
Actual: Form submitted
If you click "Raw validate", you can see the AJV validation error.
Playground
Please note that if false is replaced with {"not": {}}, everything works as expected: playground
The text was updated successfully, but these errors were encountered:
@rap1ds Wow, that's weird. Is this something you are willing to dig deeper into and perhaps provide a bug fix for the ajv8 validator?
ajv8
Sorry, something went wrong.
For some reason the schema passed to rawValidation is just { "type": "number" }, so there's a bug in schemaUtils.retrieveSchema
schema
rawValidation
{ "type": "number" }
schemaUtils.retrieveSchema
No branches or pull requests
Prerequisites
What theme are you using?
core
Version
5.x
Current Behavior
Given the following schema:
Value
13
is a valid value.Expected Behavior
In JSON Schema,
false
equals{"not": {}}
link to specThus, the schema above with value 13 should be invalid.
Steps To Reproduce
Expected: validation fails
Actual: Form submitted
If you click "Raw validate", you can see the AJV validation error.
Environment
Anything else?
Please note that if
false
is replaced with{"not": {}}
, everything works as expected: playgroundThe text was updated successfully, but these errors were encountered: