Skip to content
Discussion options

You must be logged in to vote

I got the solution. basically i was defining my schema with names like "user[first_name]" which react-hook-form parses as

{
   user: {
              first_name: undefined
         }
}

and that's the problem, when i fixed my schema name from "user[first_name]" to

user: z.object({
       first_name: z.string({
       })
})

it's solved and working as expected.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by imtheaman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant