@rjsf/core 5.13.6 → 5.14.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/core.umd.js +3 -3
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +3 -3
- package/dist/index.js.map +2 -2
- package/lib/components/Form.d.ts +1 -1
- package/lib/components/Form.js +3 -3
- package/lib/components/Form.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/package.json +12 -10
- package/src/components/Form.tsx +4 -3
- package/src/tsconfig.json +23 -0
package/dist/index.js
CHANGED
|
@@ -3477,7 +3477,7 @@ var Form = class extends import_react17.Component {
|
|
|
3477
3477
|
let schemaValidationErrors = state.schemaValidationErrors;
|
|
3478
3478
|
let schemaValidationErrorSchema = state.schemaValidationErrorSchema;
|
|
3479
3479
|
if (mustValidate) {
|
|
3480
|
-
const schemaValidation = this.validate(formData, schema, schemaUtils);
|
|
3480
|
+
const schemaValidation = this.validate(formData, schema, schemaUtils, retrievedSchema);
|
|
3481
3481
|
errors = schemaValidation.errors;
|
|
3482
3482
|
errorSchema = schemaValidation.errorSchema;
|
|
3483
3483
|
schemaValidationErrors = errors;
|
|
@@ -3529,10 +3529,10 @@ var Form = class extends import_react17.Component {
|
|
|
3529
3529
|
* @param schema - The schema used to validate against
|
|
3530
3530
|
* @param altSchemaUtils - The alternate schemaUtils to use for validation
|
|
3531
3531
|
*/
|
|
3532
|
-
validate(formData, schema = this.props.schema, altSchemaUtils) {
|
|
3532
|
+
validate(formData, schema = this.props.schema, altSchemaUtils, retrievedSchema) {
|
|
3533
3533
|
const schemaUtils = altSchemaUtils ? altSchemaUtils : this.state.schemaUtils;
|
|
3534
3534
|
const { customValidate, transformErrors, uiSchema } = this.props;
|
|
3535
|
-
const resolvedSchema = schemaUtils.retrieveSchema(schema, formData);
|
|
3535
|
+
const resolvedSchema = retrievedSchema ?? schemaUtils.retrieveSchema(schema, formData);
|
|
3536
3536
|
return schemaUtils.getValidator().validateFormData(formData, resolvedSchema, customValidate, transformErrors, uiSchema);
|
|
3537
3537
|
}
|
|
3538
3538
|
/** Renders any errors contained in the `state` in using the `ErrorList`, if not disabled by `showErrorList`. */
|