JSONB field and zod validation
I have a JSONB field with an explicit type
and the correpsonding zod schema is correctly inferred as
but I can give any value to schema and it doesn't cause a zod parsing error (eg "null", some array, some immediate values
is that expected? I thought it would enforce the type?
so for now I do a refinement like
how are we supposed to ensure the JSONB fields are typed correctly with drizzle-zod?
and the correpsonding zod schema is correctly inferred as
but I can give any value to schema and it doesn't cause a zod parsing error (eg "null", some array, some immediate values
is that expected? I thought it would enforce the type?
so for now I do a refinement like
how are we supposed to ensure the JSONB fields are typed correctly with drizzle-zod?