Skip to content

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