Version Number
7.54.2
Codesandbox/Expo snack
https://codesandbox.io/p/sandbox/angry-fermi-ssm9j8
Steps to reproduce
- Go to codesandbox link
- Click on Submit
- Both the text and array fields have errors
- Click on toggle text field
- The form-state is updated and there are no errors for the text field
- Click on toggle array
- Array field errors are still present on the form-state
Expected behaviour
Array field errors should not be present on form state when array field is not mounted. I could use the shouldUnregister parameter on the useArrayField hook but for my use case I need to keep the array values on the form when the array field is unmounted.
What browsers are you seeing the problem on?
Chrome
Code of Conduct
Version Number
7.54.2
Codesandbox/Expo snack
https://codesandbox.io/p/sandbox/angry-fermi-ssm9j8
Steps to reproduce
Expected behaviour
Array field errors should not be present on form state when array field is not mounted. I could use the
shouldUnregisterparameter on theuseArrayFieldhook but for my use case I need to keep the array values on the form when the array field is unmounted.What browsers are you seeing the problem on?
Chrome
Code of Conduct