Replies: 1 comment
|
I've retested it with the current version, but the issue still persists. I have updated the codesandbox in the post, to use the newest 7.x version of react hook form. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.53.0
Codesandbox
https://codesandbox.io/p/sandbox/updated-zod-onsubmit-validation-async-rg5wzj
Steps to reproduce
mode: "onSubmit"andreValidateMode: "onSubmit"onSubmitfunction throughhandleSubmit, which waits for a bit and then adds an error to the form=> The error disappears every time while the asynchronous part of
onSubmitis runningExpected behaviour
The error stays visible until the
onSubmithas fully completed and only disappears if no errors are added during theonSubmit. The documentation saysIf we have a synchronous function, it seems to work as expected, the error disappears as soon as a line containing an
awaitis hit.What browsers are you seeing the problem on?
Firefox, Chrome
Relevant log output
No response
Code of Conduct
All reactions