Unexpected behaviour of drizzle-zod createInsertSchema
I have this postgres schema:
And this insert schema created with the Drizzle Zod extension:
3 Replies
And I've found that unless I extend the schema and set many of these properties to be required, the inferred schema considers nullish values acceptable for many of the properties that are set as mandatory on the Postgres schema.
Why is this happening? Thank you.
how do you deal with numeric values? I'm not sure how to extend that so it's respected by the frontend
Could you elaborate on your question? I don't get the question unfortunately.