Is there any way to access context
provided by react-hook-form inside zod's superRefine
?
#11403
Replies: 7 comments
-
Hi, @DiegoSaturno ! Any progress on this question? I'm trying to figure out how to do this correctly with Zod. Because in Yup library, for example, this approach is really common and easy to use. |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? |
Beta Was this translation helpful? Give feedback.
-
Please add this. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the library, but is there any updates/workarounds? |
Beta Was this translation helpful? Give feedback.
-
up ! pls |
Beta Was this translation helpful? Give feedback.
-
Any update on this? I really need this and i'd prefer not to use yup. |
Beta Was this translation helpful? Give feedback.
-
This is a must have in my opinion! |
Beta Was this translation helpful? Give feedback.
-
Context:
I have a validation on my form that depends on a calculated value, provided by an xstate selector. I tried to access it through zod's
RefinementContext
but wasn't able to do so.Is there any way I can get this value inside
superRefine
? If not, is there any way I can write a custom resolver and merge it withzodResolver
?The code looks like this:
Beta Was this translation helpful? Give feedback.
All reactions