-
-
Notifications
You must be signed in to change notification settings - Fork 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
Validation is no longer working on useFieldArray fields #5234
Comments
I just tried upgrading, and the bug is still there. When adding a new list of fields, the form becomes invalid. Go to https://codesandbox.io/s/romantic-ptolemy-nlgcc?file=/src/App.tsx and change the version to 7.6.2 |
Screen.Recording.2021-05-19.at.9.14.25.pm.movcan you share steps to reproduce the issue? (I followed the issue steps) |
Hi again, I have a hard time reproducing it, but it still fails in my application. Only thing I wonder is that when I add a new row, it becomes invalid because there is a https://codesandbox.io/s/romantic-ptolemy-nlgcc?file=/src/App.tsx See the |
Thanks @janhartmann i will try again later this weekend, see if I can reproduce this issue. if anyone else having a similar issue, please help to reproduce the problem. |
I was able to solve my problem in my application by not using a |
Thanks @janhartmann interesting... i will take a deeper look this weekend anyhow. |
Couldn't reproduce the issue... I am attaching a unit test for this, and feel free to follow me (anyone) up on this issue, if whoever can reproduce it in a codesandbox. |
Describe the bug
After upgrading to 7.X we are now experiencing problems with validation of fields inside
useFieldArray
.When adding a new row of fields, the form is invalid no matter if the fields has been filled out correctly. Removing the newly added row, makes the validation true. Only filling out the default row makes the form valid, however, adding two rows and remove the default one makes the form invalid.
To Reproduce
Steps to reproduce the behavior:
Codesandbox link (Required)
https://codesandbox.io/s/romantic-ptolemy-nlgcc?file=/src/App.tsx
Expected behavior
The validation to form on dynamically added fields.
The text was updated successfully, but these errors were encountered: