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
If there is an error in dependencies, normal errors do not appear in errors object. See example below:
var schema = { "type": "object", "properties": { "name": { "type": "string" }, "surname": { "type": "string" }, "credit_card": { "type": "number" } }, "dependencies": { "credit_card": { "properties": { "billing_address": { "type": "string" } }, "required": ["billing_address"] } }, "required": ["name", "surname"] }; var data = { "credit_card": "jj" }; var errors = validator.validate(schema, data);
The errors object produced is:
{ "validation": { "billing_address": { "required": true } } }
However errors object should report name, surname fields should be required, and credit card field should be numeric.
Same schema produces with data below.
var data = { "age": 28 } { "validation": { "name": { "required": true }, "surname": { "required": true } } }
Not to clutter here, I didn't include custom checks. Custom checks have same issue.
Regards,
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If there is an error in dependencies, normal errors do not appear in errors object. See example below:
The errors object produced is:
However errors object should report name, surname fields should be required, and credit card field should be numeric.
Same schema produces with data below.
Not to clutter here, I didn't include custom checks. Custom checks have same issue.
Regards,
The text was updated successfully, but these errors were encountered: