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
Hi,
i've come across an issue with the custom validator on root object schemas.
The custom validator is not handled when we create a root object schema.
const schemaRoot = { type: 'object', $$root: true, props: { prop1: { type: 'string', optional: true }, prop2: { type: 'string', optional: true }, }, custom: (v, errors, schema, object) => { console.log(v, errors, schema, object); return v; } };
The result when validating the schema is:
-------------------- ROOT object test -------------------- Data: { prop1: '' } Schema: { type: 'object', '$$root': true, props: { prop1: { type: 'string', optional: true }, prop2: { type: 'string', optional: true } }, custom: [Function: custom] } Validate Result: true
I've created a repl.it repository with test demo.
Repl.it Demo
The text was updated successfully, but these errors were encountered:
68967e9
Fix is released in 1.4.1
Sorry, something went wrong.
No branches or pull requests
Hi,
i've come across an issue with the custom validator on root object schemas.
The custom validator is not handled when we create a root object schema.
The result when validating the schema is:
I've created a repl.it repository with test demo.
Repl.it Demo
The text was updated successfully, but these errors were encountered: