z-schema 4.2.1 → 4.2.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/dist/ZSchema-browser.js
CHANGED
|
@@ -6545,7 +6545,9 @@ var JsonValidators = {
|
|
|
6545
6545
|
return;
|
|
6546
6546
|
}
|
|
6547
6547
|
|
|
6548
|
-
|
|
6548
|
+
var stringMultipleOf = String(schema.multipleOf);
|
|
6549
|
+
var scale = Math.pow(10, stringMultipleOf.length - stringMultipleOf.indexOf(".") - 1);
|
|
6550
|
+
if (Utils.whatIs((json * scale) / (schema.multipleOf * scale)) !== "integer") {
|
|
6549
6551
|
report.addError("MULTIPLE_OF", [json, schema.multipleOf], null, schema);
|
|
6550
6552
|
}
|
|
6551
6553
|
},
|
package/package.json
CHANGED
package/src/JsonValidation.js
CHANGED
|
@@ -21,7 +21,9 @@ var JsonValidators = {
|
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
var stringMultipleOf = String(schema.multipleOf);
|
|
25
|
+
var scale = Math.pow(10, stringMultipleOf.length - stringMultipleOf.indexOf(".") - 1);
|
|
26
|
+
if (Utils.whatIs((json * scale) / (schema.multipleOf * scale)) !== "integer") {
|
|
25
27
|
report.addError("MULTIPLE_OF", [json, schema.multipleOf], null, schema);
|
|
26
28
|
}
|
|
27
29
|
},
|