Validation triggering on useFieldArray append
See original GitHub issueDescribe the bug
I have a custom component which handle’s a useFieldArray. It supports the adding of additional fields using the append function. However, upon pressing append validation is triggered for the entire form.
You’ll see I’m passing errors to display some labels and these are shown on appending.
I’ve tried using a defaultValue for the input (see commented out line 41 in ArrayInput.tsx), but I am unable to run:
Property 'value' does not exist on type 'Record<"id", string>'.
I’ve tired loosening the typing with some any usage, but this has no effect.
To Reproduce Steps to reproduce the behavior:
- Click on either ‘Add another’
- Validation is triggered for form and error labels are shown.
Codesandbox link (Required) https://codesandbox.io/s/usefieldarray-error-uknm4?file=/src/ArrayInput.tsx
Expected behavior Validation doesn’t happen until submit is pressed.
Desktop (please complete the following information):
- Browser Chrome
- Version 88
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (6 by maintainers)

Top Related StackOverflow Question
Ah, such a small oversight! thank you very much @bluebill1049
np.