Jacob
Explore posts from serversDTDrizzle Team
•Created by Jacob on 11/3/2023 in #help
[BUG]: React Hook Form doesn't submit when using drizzle-zod to create schemes to use in zodResolver
When using
drizzle-zod
to generate schemas from database schemas and using them in the useForm
resolvers the onSubmit won't fire at all for some reason,
So for example:
and then using it in the useForm
in this example when you click the Submit
from the form it doesn't work at all.
however if you build your own schema using zod it works fine.
For reference this was working about a about a week ago.
No errors show in the browser console or terminal, so i don't know what is up there
I have posted issues on react-hook-form
and drizzle-orm
however I'm not sure which team is that the problem is coming from
https://github.com/react-hook-form/resolvers/issues/642
https://github.com/drizzle-team/drizzle-orm/issues/1448
To Reproduce
Steps to reproduce the behavior:
1. create a schema using zod
2. create a zod schema using drizzle-zod
and createInsertSchema
3. import that schema into a useForm
resolver
4. try submitting the form (should not work)
Codesandbox link
very simple application that doesn't seem to submit:
https://codesandbox.io/p/sandbox/react-hook-form-zod-resolver-not-working-9c7qn9
Environment & setup
Operating systems that is is occuring in:
- Mac ventura 13.5.2,
- Windows 10
- Windows 11
- Codesandbox
Browsers:
- Chrome
Versions of packages:
- react-hook-form
: 7.47.0
- @hookform/resolvers
: 3.3.2
- drizzle-orm
: 0.28.6
- drizzle-zod
: 0.5.1
- drizzle-kit
: 0.19.131 replies
DTDrizzle Team
•Created by Jacob on 8/11/2023 in #help
Running into an error when runing `drizzle-kit push:mysql` yet i haven't changed anything
So i seem to be running into this error:
This has only just been happening since about the last drizzle update, i have tried changing my schema with no luck.
My version of drizzle and drizzle-kit
Please find my schema attached below:
10 replies