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
Problem
Both inefficiencies prevent implementing ajv-keywords #100: errorMessage keyword does not catch type errors when type is validated after all keywords.
errorMessage
Solution
{type: 'integer', minimum: 1, maximum: 5}
if data is a number, check that it is >= 1 and <=5, otherwise check that it is an integer.
Instead it should be compiled to:
if data is an integer, check that it is >= 1 and <=5, otherwise fail validation.
The text was updated successfully, but these errors were encountered:
feat: validate types before other keywords, #485
f60fedb
refactor: make sure "type": "integer" is vaildated before other keywo…
a02b9a6
…rds, closes #485
Revert "refactor: make sure "type": "integer" is vaildated before oth…
cad7605
…er keywords, closes #485" This reverts commit a02b9a6.
change for integer is reverted so that schema {type: 'integer', maximum: 5} returns 2 errors for 5.5.
{type: 'integer', maximum: 5}
5.5
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Problem
Both inefficiencies prevent implementing ajv-keywords #100:
errorMessage
keyword does not catch type errors when type is validated after all keywords.Solution
{type: 'integer', minimum: 1, maximum: 5}
is currently compiled to:Instead it should be compiled to:
The text was updated successfully, but these errors were encountered: