forked from rjsf-team/react-jsonschema-form
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…mData()` call (rjsf-team#3358) * fix: Fixed 3170 by passing `uiSchema` into the `validateFormData()` call Fixes rjsf-team#3170 by updating types and implementations to support passing `uiSchema` to the `validateFormData()` call so that it can be forwarded to `customValidate()` and `transformErrors()` - In `@rjsf/utils`, updated the `ValidatorType` to take the `F` generic so that `validateFormData()` can be passed `uiSchema?: UiSchema<T, S, F>` - This required updating all of the schema-based functions to also take the `F` generic and properly adding generics to all the function calls - Also, the `CustomValidator` and `ErrorTransformer` types were updated to take all the generics needed to add the `uiSchema?: UiSchema<T, S, F>` parameter to the functions - In `@rjsf/validator-ajv6`, updated the `customizeValidator` and `AJV6Validator` implementations to add the `S` and `F` generics - Updated `validateFormData()` to accept a new optional `uiSchema` parameter that is passed to `transformErrors()` and `customValidate()` - In `@rjsf/validator-ajv8`, updated the `customizeValidator` and `AJV8Validator` implementations to add the `F` generic - Updated `validateFormData()` to accept a new optional `uiSchema` parameter that is passed to `transformErrors()` and `customValidate()` - In `@rjsf/core`, updated the `ValidatorType`, `CustomValidator` and `ErrorTransformer` types to add the appropriate missing generics - Also passed `uiSchema` to the `validateFormData()` call - Updated the `utility-functions.md` file to add the new generics - Updated the `typescript.md` file to switch to using `customizeValidator()` with the generics to get the `validator` - Updated the `CHANGELOG.md` file accordingly * - Add test cases to validate the proper passing of `uiSchema`
- Loading branch information
1 parent
1a9780b
commit e4067bb
Showing
22 changed files
with
470 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.