-
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
ExtraErrors are merged into errorSchema again and again #3169
Comments
The issue seems to be caused by this line
Here the newErrorSchema is merged with the extraErrors but instead of replacing the field errors the extraErrors.email.__errors are appended everytime it runs.
|
I'm not able to reproduce this issue on the main branch, so it seems to be fixed there. Waiting for the next beta release now. |
@krebbl Beta 11 has been out for a few days... give it a try |
@heath-freenome Thanks for letting me! I just tried it in the linked code sandbox and the issue unfortunately still exists. https://codesandbox.io/s/vigilant-violet-8txkdr?file=/package.json |
@heath-freenome I am hitting this also in beta.12 |
Fixed rjsf-team#3169 by merging `extraErrors` in while preventing duplicates - Updated `@rjsf/utils` to make the `mergeObjects()` function support a `preventDuplicates` mode when concatenating arrays - Updated the tests to verify this new feature - Updated `@rjsf/core` to use the `preventDuplicates` mode when merging `extraErrors` when not live validating - Updated `validation.md` to remove extraneous leading space to fix rjsf-team#3282 - Updated `utility-functions.md` to document the new mode - Updated `index.md` to provide the proper `core.cjs.production.min.js` package name for `unpkg.com` fixing rjsf-team#3262 - Updated the `CHANGELOG.md` accordingly
* fix: Prevent duplicated extraErrors when not live validating Fixed #3169 by merging `extraErrors` in while preventing duplicates - Updated `@rjsf/utils` to make the `mergeObjects()` function support a `preventDuplicates` mode when concatenating arrays - Updated the tests to verify this new feature - Updated `@rjsf/core` to use the `preventDuplicates` mode when merging `extraErrors` when not live validating - Updated `validation.md` to remove extraneous leading space to fix #3282 - Updated `utility-functions.md` to document the new mode - Updated `index.md` to provide the proper `core.cjs.production.min.js` package name for `unpkg.com` fixing #3262 - Updated the `CHANGELOG.md` accordingly * - Responded to reviewer feedback * - Fixed url for unpkg directory
…m#3288) * fix: Prevent duplicated extraErrors when not live validating Fixed rjsf-team#3169 by merging `extraErrors` in while preventing duplicates - Updated `@rjsf/utils` to make the `mergeObjects()` function support a `preventDuplicates` mode when concatenating arrays - Updated the tests to verify this new feature - Updated `@rjsf/core` to use the `preventDuplicates` mode when merging `extraErrors` when not live validating - Updated `validation.md` to remove extraneous leading space to fix rjsf-team#3282 - Updated `utility-functions.md` to document the new mode - Updated `index.md` to provide the proper `core.cjs.production.min.js` package name for `unpkg.com` fixing rjsf-team#3262 - Updated the `CHANGELOG.md` accordingly * - Responded to reviewer feedback * - Fixed url for unpkg directory
…m#3288) * fix: Prevent duplicated extraErrors when not live validating Fixed rjsf-team#3169 by merging `extraErrors` in while preventing duplicates - Updated `@rjsf/utils` to make the `mergeObjects()` function support a `preventDuplicates` mode when concatenating arrays - Updated the tests to verify this new feature - Updated `@rjsf/core` to use the `preventDuplicates` mode when merging `extraErrors` when not live validating - Updated `validation.md` to remove extraneous leading space to fix rjsf-team#3282 - Updated `utility-functions.md` to document the new mode - Updated `index.md` to provide the proper `core.cjs.production.min.js` package name for `unpkg.com` fixing rjsf-team#3262 - Updated the `CHANGELOG.md` accordingly * - Responded to reviewer feedback * - Fixed url for unpkg directory
Prerequisites
What theme are you using?
core
Version
5.x Beta.10
Current Behavior
The passed extraErrors are rendered multiple times when typing into an input field.
Expected Behavior
The
extraErrors
should only be displayed once.Steps To Reproduce
See example: https://codesandbox.io/s/vigilant-violet-8txkdr
Given the following Form config:
When typing something into the password field, the extra errors are appended in the UI again and again.
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: