-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing uiSchema When TransformingErrors #3170
Comments
@Bedrock02 since the
|
@heath-freenome did you get a chance to look at the jsfiddle I provided? I'm doing just that
|
@Bedrock02 so you have a bug in your jsfiddle... the property is |
Thanks @heath-freenome. This issue smells like something is happening on our end. Will update once we figure this out. |
@heath-freenome seems to be an error state race condition happening on load. It is only effecting |
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
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
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
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
…call (#3358) * fix: Fixed 3170 by passing `uiSchema` into the `validateFormData()` call Fixes #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`
…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`
…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`
Prerequisites
What theme are you using?
core
Version
^4.2.4
Current Behavior
For required properties in a schema, we are unable to transform errors. Our transformer relies on attributes from the uiSchema to render a message with ui:title. The error AjvError provides the incorrect object, or will not provide the uiSchema at all.
Expected Behavior
Steps To Reproduce
schema
anduiSchema
into the formliveValidate={true}
)Environment
Anything else?
https://jsfiddle.net/Bedrock02/06nu13gq/57/
The text was updated successfully, but these errors were encountered: