- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.3k
 
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Version Number
7.46.0
Codesandbox/Expo snack
https://codesandbox.io/s/resolver-validation-bug-qjq7kk?file=/src/App.tsx
Steps to reproduce
- Go to https://codesandbox.io/s/resolver-validation-bug-qjq7kk?file=/src/App.tsx
 - Click on "Add" in the "With Resolvers" form
 - See that the required error is shown
 - Click "Add" again
 - See that the required errors are missing now
 - Click on "Submit" and "Add"
 - See that field errors are reset
 
Video:
resolver.mp4
I'm actually showing more than one error in this video.
- Probably related to issue: field-array-level validation errors not sent to the formState when blurring array items' inputs #10776.
 - On field add, the validation is immediately triggered, when using resolvers. This does not happen if plain rules are used instead.
 - If a fieldArray/root error comes in, each field error is reset. You can see that the required errors are lost once the root error comes in.
 - (Maybe related to 3.) Field errors are cleared when the form is submitted and afterwards a new field is added.
 
Expected behaviour
- On field edit, the error of the fieldArray should be updated
 - When using resolvers, adding fields don't immediately trigger the validation
 - FieldArray errors don't reset the field errors
 - Adding fields doesn't reset field errors after submit
 
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
 
jkatofskyCoveo
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested