z-schema 3.25.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/ZSchema-browser-min.js +1 -1
- package/dist/ZSchema-browser-min.js.map +1 -1
- package/dist/ZSchema-browser-test.js +1253 -878
- package/dist/ZSchema-browser.js +338 -162
- package/package.json +7 -4
- package/src/JsonValidation.js +65 -3
- package/src/Report.js +11 -0
- package/src/SchemaCache.js +17 -10
package/README.md
CHANGED
|
@@ -489,6 +489,16 @@ var validator = new ZSchema({
|
|
|
489
489
|
});
|
|
490
490
|
```
|
|
491
491
|
|
|
492
|
+
## includeErrors
|
|
493
|
+
|
|
494
|
+
By default, z-schema reports all errors. If interested only in a subset of the errors, passing the option `includeErrors` to `validate` will perform validations only for those errors.
|
|
495
|
+
|
|
496
|
+
```javascript
|
|
497
|
+
var validator = new ZSchema();
|
|
498
|
+
// will only execute validation for "INVALID_TYPE" error.
|
|
499
|
+
validator.validate(json, schema, {includeErrors: ["INVALID_TYPE"]});
|
|
500
|
+
```
|
|
501
|
+
|
|
492
502
|
## customValidator
|
|
493
503
|
|
|
494
504
|
**Warning**: Use only if know what you are doing. Always consider using [custom format](#register-a-custom-format) before using this option.
|