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
wait for: mafintosh/is-my-json-valid#38 (comment) and mafintosh/is-my-json-valid#43 and mafintosh/is-my-json-valid#46
The text was updated successfully, but these errors were encountered:
branch https://github.com/adrai/node-cqrs-domain/tree/validator
Sorry, something went wrong.
my tmp clipboard:
var validator = require('is-my-json-valid'); var ext = { type: 'number' }; var validate = validator({ type: 'object', properties: { hello: { type: 'string', format: 'only-a' }, hello2: { '$ref': '/other' } }, required: ['hello', 'hello2'] }, { schemas: { '/other2': ext }, formats: { // 'only-a': /^a+$/ 'only-a': function (data) { if (data.indexOf('b') >= 0) { return false; } return true; } }, verbose: true, greedy: true }); console.log(validate({ hello: 'aa', hello2: 3 })); // true console.log(validate.errors); console.log(validate.missing); console.log(validate({ hello: 'ab' })); // false console.log(validate.errors);
No branches or pull requests
wait for: mafintosh/is-my-json-valid#38 (comment) and mafintosh/is-my-json-valid#43 and mafintosh/is-my-json-valid#46
The text was updated successfully, but these errors were encountered: