z-schema 4.2.3 → 5.0.2

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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "z-schema",
3
- "version": "4.2.3",
3
+ "version": "5.0.2",
4
4
  "engines": {
5
- "node": ">=6.0.0"
5
+ "node": ">=8.0.0"
6
6
  },
7
7
  "description": "JSON schema validator",
8
8
  "homepage": "https://github.com/zaggino/z-schema",
@@ -68,7 +68,7 @@
68
68
  "dependencies": {
69
69
  "lodash.get": "^4.4.2",
70
70
  "lodash.isequal": "^4.5.0",
71
- "validator": "^12.0.0"
71
+ "validator": "^13.7.0"
72
72
  },
73
73
  "optionalDependencies": {
74
74
  "commander": "^2.7.1"
package/src/ZSchema.js CHANGED
@@ -52,8 +52,8 @@ var defaultOptions = {
52
52
  strictMode: false,
53
53
  // report error paths as an array of path segments to get to the offending node
54
54
  reportPathAsArray: false,
55
- // stops validation as soon as an error is found, true by default but can be turned off
56
- breakOnFirstError: true,
55
+ // stop validation as soon as an error is found
56
+ breakOnFirstError: false,
57
57
  // check if schema follows best practices and common sense
58
58
  pedanticCheck: false,
59
59
  // ignore unknown formats (do not report them as an error)
@@ -188,7 +188,7 @@ ZSchema.prototype.validate = function (json, schema, options, callback) {
188
188
 
189
189
  var whatIs = Utils.whatIs(schema);
190
190
  if (whatIs !== "string" && whatIs !== "object") {
191
- var e = new Error("Invalid .validate call - schema must be an string or object but " + whatIs + " was passed!");
191
+ var e = new Error("Invalid .validate call - schema must be a string or object but " + whatIs + " was passed!");
192
192
  if (callback) {
193
193
  process.nextTick(function () {
194
194
  callback(e, false);