Closed jviotti closed 2 years ago
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) })()
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.
Update has been published
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: