Doesn't adhere to the draft4 official test suite with regards to minLength and unicode
jviotti opened this issue · 2 comments
jviotti commented
This validator seems to be failing this test: https://github.com/json-schema-org/JSON-Schema-Test-Suite/blob/dfcea626f1bb442008dc7f5183a002c398f6601c/tests/draft4/minLength.json#L27-L29.
As a runnable example:
const JsonSchema = require("@hyperjump/json-schema");
const schemaJson = {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://example.com/schemas/test",
"minLength": 2
};
JsonSchema.add(schemaJson);
(async () => {
const schema = await JsonSchema.get("http://example.com/schemas/test");
const output = await JsonSchema.validate(schema, "\uD83D\uDCA9");
console.log(output)
})()
jdesrosiers commented
As we discussed on slack. This was a deliberate deviation from the test suite, but I was convinced to change the behavior to match the tests.
jdesrosiers commented
Update has been published