Is there any good way to make react-hook-form work with async validation + zod superRefine? #11942
Unanswered
alex-collibra
asked this question in
Q&A
Replies: 1 comment
-
Hi @alex-collibra, Here's my way of doing it. Hope this would help!. Things to Note:
|
Beta Was this translation helpful? Give feedback.
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.
-
I have a pretty valid usecase, in my opinion: we need to send a value to backend, then backend does some validation and returns an error code back.
I tried a lot of different things, without luck so far. As validation relies on BE response, I believe superRefine is the only way to do it.
However, I faced a lot of issues.
isValid
flag isfalse
.The closest behaviour I could get to so far is using this example #40 (comment)
However, it is still causing an issue with #4 when
isValidating
becomes enabled, when it shouldn't.Has anyone every had any luck with making it work? It seems like a lot of pain for smth relatively common 😔
Beta Was this translation helpful? Give feedback.
All reactions