zod Resolver - Handling error message with refine #8084
Replies: 2 comments
-
@CallumVass Did you find a solution or workaround? I'm facing the same issue right now |
Beta Was this translation helpful? Give feedback.
0 replies
-
@stefan-girlich - Sorry I don't remember, this was 2 years ago and I don't use react anymore. Sorry I can't be much help now. |
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.
-
Hi,
I have a zod schema which is like a survey (a bunch of questions are returned from the server for a user to answer) and in that, I am making use of refine to get the state of a question to check whether the value is required or not. Essentially I have 2 question types (either Text or Option) and in the Option one, there may be a child question associated to it (think of the times you see "Other" in surveys and a "Please describe" question next to it) - This is what my refine is working out.
When I submit the form, I can see the error is in the console but it's "ref" is undefined so it seems like it isn't attached to a component and I'm a bit stuck in how I can attach it? Maybe I have gone about it wrong entirely? I'd appreciate any help, thanks!
I have created a code sandbox of the issue below:
https://codesandbox.io/s/66727547-reset-nested-array-in-react-hook-form-forked-todxxp
Beta Was this translation helpful? Give feedback.
All reactions