pattern
should only be applicable to the string type, and no other types
#242
Labels
good first issue
An issue that is a good candidate for new contributors
missing test
A request to add a test to the suite that is currently not covered elsewhere.
There's a Stackoverflow question that asks how you can validate the number of digits in a number using JSON Schema: https://stackoverflow.com/questions/53449740/how-can-i-validate-number-of-digits-in-a-number-using-json-schema-ajv/53449981
I explained, you cannot currently do this. Someone suggested you could use
pattern
, however it is only applicable to strings and not other types.We have a test for checking
pattern
isn't applied to a bool, but no test to check that it isn't applied to a number.There should be a test for checking that
pattern
isn't incorrectly applied to all other types. Some languages will stringify numbers.The text was updated successfully, but these errors were encountered: