Replies: 3 comments 3 replies
-
If this depends on field-related validation then it's a limitation that would require trigger API, hook form is field level focused. |
Beta Was this translation helpful? Give feedback.
-
To which error(s) are you referring to? My 4 mentioned errors (except the first one) are referring to a different behavior "with resolvers" and "without resolvers" (with rules). Because the 3 errors are working when I don't use resolvers and just rules, I assume that there is no limitation regarding that. |
Beta Was this translation helpful? Give feedback.
-
The problem is caused by zod issue order from your schema. For example, at the first time adding item, root error path But for the second adding, error path You can implement a custom resolver to prioritize order of root error path to achieve your expected behavior. Working demo: https://codesandbox.io/s/resolver-validation-bug-forked-dqs4cn?file=/src/FormWithResolver.tsx |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Version Number
7.46.0
Codesandbox/Expo snack
https://codesandbox.io/s/resolver-validation-bug-qjq7kk?file=/src/App.tsx
Steps to reproduce
Video:
resolver.mp4
I'm actually showing more than one error in this video.
Expected behaviour
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions