Skip to content

Fixes error handling for array errors with root error #656

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

Merged

Conversation

SangJunBak
Copy link
Contributor

Fixes #629

Issue:
If you had a field array with two elements and an error in the second element THEN a root error, .compact would recognize the second element error as an error in the first element.

Solution:
Get rid of .compact

Copy link
Member

@jorisre jorisre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks for your contribution

@jorisre jorisre merged commit 235bbcd into react-hook-form:master Dec 30, 2023
@Yihao-G
Copy link

Yihao-G commented Jan 3, 2024

Do you mind releasing a new package version, please?

Copy link
Contributor

github-actions bot commented Jan 4, 2024

🎉 This PR is included in version 3.3.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error Handling in useFieldArray with Root Error
3 participants