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
Before I upgrade ajv form 6 to 7, ajv-keywords from 3 to 4
this worked:
const { default: Ajv } = require('ajv'); const validator = new Ajv({ $data: true, useDefaults: true, coerceTypes: true, allErrors: true, }); require('ajv-keywords')(validator, 'select'); const schema = { type: 'object', properties: { cond: { type: 'object', properties: { enabled: { type: 'boolean', }, }, select: { $data: '0/enabled', someString: { type: 'string', }, }, selectCases: { true: { required: ['someString', 'someNum'], properties: { someNum: { type: 'number', }, }, }, }, }, }, }; validator.validate(schema, { cond: { enabled: true, }, }); // Can check the required fields console.log(validator.errors);
and now it doesn't work unless I change the type of enabled to string which is unexpected
The text was updated successfully, but these errors were encountered:
Hello, any updates?
Sorry, something went wrong.
91ad853
No branches or pull requests
Before I upgrade ajv form 6 to 7, ajv-keywords from 3 to 4
this worked:
and now it doesn't work unless I change the type of enabled to string which is unexpected
The text was updated successfully, but these errors were encountered: