@naturalcycles/nodejs-lib 15.80.0 → 15.80.1
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.
|
@@ -481,7 +481,7 @@ export function createAjv(opt) {
|
|
|
481
481
|
keyword: 'anyOfBy',
|
|
482
482
|
type: 'object',
|
|
483
483
|
modifying: true,
|
|
484
|
-
errors:
|
|
484
|
+
errors: true,
|
|
485
485
|
schemaType: 'object',
|
|
486
486
|
compile(config, _parentSchema, _it) {
|
|
487
487
|
const { propertyName, schemaDictionary } = config;
|
|
@@ -503,7 +503,12 @@ export function createAjv(opt) {
|
|
|
503
503
|
];
|
|
504
504
|
return false;
|
|
505
505
|
}
|
|
506
|
-
|
|
506
|
+
const result = isValidFn(data);
|
|
507
|
+
if (!result) {
|
|
508
|
+
;
|
|
509
|
+
validate.errors = isValidFn.errors;
|
|
510
|
+
}
|
|
511
|
+
return result;
|
|
507
512
|
}
|
|
508
513
|
return validate;
|
|
509
514
|
},
|
package/package.json
CHANGED
|
@@ -547,7 +547,7 @@ export function createAjv(opt?: Options): Ajv2020 {
|
|
|
547
547
|
keyword: 'anyOfBy',
|
|
548
548
|
type: 'object',
|
|
549
549
|
modifying: true,
|
|
550
|
-
errors:
|
|
550
|
+
errors: true,
|
|
551
551
|
schemaType: 'object',
|
|
552
552
|
compile(config, _parentSchema, _it) {
|
|
553
553
|
const { propertyName, schemaDictionary } = config
|
|
@@ -574,7 +574,11 @@ export function createAjv(opt?: Options): Ajv2020 {
|
|
|
574
574
|
return false
|
|
575
575
|
}
|
|
576
576
|
|
|
577
|
-
|
|
577
|
+
const result = isValidFn(data)
|
|
578
|
+
if (!result) {
|
|
579
|
+
;(validate as any).errors = isValidFn.errors
|
|
580
|
+
}
|
|
581
|
+
return result
|
|
578
582
|
}
|
|
579
583
|
|
|
580
584
|
return validate
|