@rjsf/validator-ajv8
Advanced tools
Comparing version 5.12.0 to 5.12.1
@@ -272,3 +272,2 @@ "use strict"; | ||
this.mainValidator = this.getValidator(rootSchema); | ||
this.resolvedRootSchema = (0, import_utils4.retrieveSchema)(this, rootSchema, rootSchema); | ||
} | ||
@@ -307,3 +306,4 @@ /** Returns the precompiled validator associated with the given `schema` from the map of precompiled validator | ||
rawValidation(schema, formData) { | ||
if (!(0, import_isEqual.default)(schema, this.resolvedRootSchema)) { | ||
const resolvedRootSchema = (0, import_utils4.retrieveSchema)(this, this.rootSchema, this.rootSchema, formData); | ||
if (!(0, import_isEqual.default)(schema, resolvedRootSchema)) { | ||
throw new Error( | ||
@@ -310,0 +310,0 @@ "The schema associated with the precompiled schema differs from the schema provided for validation" |
@@ -254,3 +254,2 @@ // src/validator.ts | ||
this.mainValidator = this.getValidator(rootSchema); | ||
this.resolvedRootSchema = retrieveSchema(this, rootSchema, rootSchema); | ||
} | ||
@@ -289,3 +288,4 @@ /** Returns the precompiled validator associated with the given `schema` from the map of precompiled validator | ||
rawValidation(schema, formData) { | ||
if (!isEqual(schema, this.resolvedRootSchema)) { | ||
const resolvedRootSchema = retrieveSchema(this, this.rootSchema, this.rootSchema, formData); | ||
if (!isEqual(schema, resolvedRootSchema)) { | ||
throw new Error( | ||
@@ -292,0 +292,0 @@ "The schema associated with the precompiled schema differs from the schema provided for validation" |
@@ -224,3 +224,2 @@ (function (global, factory) { | ||
this.mainValidator = this.getValidator(rootSchema); | ||
this.resolvedRootSchema = utils.retrieveSchema(this, rootSchema, rootSchema); | ||
} | ||
@@ -259,3 +258,4 @@ /** Returns the precompiled validator associated with the given `schema` from the map of precompiled validator | ||
rawValidation(schema, formData) { | ||
if (!isEqual(schema, this.resolvedRootSchema)) { | ||
const resolvedRootSchema = utils.retrieveSchema(this, this.rootSchema, this.rootSchema, formData); | ||
if (!isEqual(schema, resolvedRootSchema)) { | ||
throw new Error( | ||
@@ -262,0 +262,0 @@ "The schema associated with the precompiled schema differs from the schema provided for validation" |
@@ -13,7 +13,2 @@ import { CustomValidator, ErrorSchema, ErrorTransformer, FormContextType, RJSFSchema, StrictRJSFSchema, UiSchema, ValidationData, ValidatorType } from '@rjsf/utils'; | ||
readonly rootSchema: S; | ||
/** The root schema resolved top level refs | ||
* | ||
* @private | ||
*/ | ||
readonly resolvedRootSchema: S; | ||
/** The `ValidatorFunctions` map used to construct this validator | ||
@@ -20,0 +15,0 @@ * |
@@ -21,3 +21,2 @@ import get from 'lodash/get'; | ||
this.mainValidator = this.getValidator(rootSchema); | ||
this.resolvedRootSchema = retrieveSchema(this, rootSchema, rootSchema); | ||
} | ||
@@ -56,3 +55,4 @@ /** Returns the precompiled validator associated with the given `schema` from the map of precompiled validator | ||
rawValidation(schema, formData) { | ||
if (!isEqual(schema, this.resolvedRootSchema)) { | ||
const resolvedRootSchema = retrieveSchema(this, this.rootSchema, this.rootSchema, formData); | ||
if (!isEqual(schema, resolvedRootSchema)) { | ||
throw new Error('The schema associated with the precompiled schema differs from the schema provided for validation'); | ||
@@ -59,0 +59,0 @@ } |
{ | ||
"name": "@rjsf/validator-ajv8", | ||
"version": "5.12.0", | ||
"version": "5.12.1", | ||
"main": "dist/index.js", | ||
@@ -52,3 +52,3 @@ "module": "lib/index.js", | ||
"@babel/preset-typescript": "^7.22.5", | ||
"@rjsf/utils": "^5.12.0", | ||
"@rjsf/utils": "^5.12.1", | ||
"@types/json-schema": "^7.0.12", | ||
@@ -86,3 +86,3 @@ "@types/lodash": "^4.14.196", | ||
"license": "Apache-2.0", | ||
"gitHead": "bab797c43a34e5ec68a84b2bdabb3c377e46b092" | ||
"gitHead": "de6477730fd16a07def501c2cb761af9c3f4c247" | ||
} |
@@ -39,8 +39,2 @@ import { ErrorObject } from 'ajv'; | ||
/** The root schema resolved top level refs | ||
* | ||
* @private | ||
*/ | ||
readonly resolvedRootSchema: S; | ||
/** The `ValidatorFunctions` map used to construct this validator | ||
@@ -76,3 +70,2 @@ * | ||
this.mainValidator = this.getValidator(rootSchema); | ||
this.resolvedRootSchema = retrieveSchema(this, rootSchema, rootSchema); | ||
} | ||
@@ -114,3 +107,4 @@ | ||
rawValidation<Result = any>(schema: S, formData?: T): RawValidationErrorsType<Result> { | ||
if (!isEqual(schema, this.resolvedRootSchema)) { | ||
const resolvedRootSchema = retrieveSchema(this, this.rootSchema, this.rootSchema, formData); | ||
if (!isEqual(schema, resolvedRootSchema)) { | ||
throw new Error( | ||
@@ -117,0 +111,0 @@ 'The schema associated with the precompiled schema differs from the schema provided for validation' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
243048
2541