Drizzle Zod refining not working?

Shouldn't this code for zod make an optional field firstName required? https://drizzle.run/t2zowcjw5f1xbb5ny7zq2j3n
2 Replies
rphlmr ⚡
rphlmr ⚡4mo ago
Should be
const insertUserSchema = createInsertSchema(users).extend({
firstName: z.string().min(1, { message: 'First Name is required' })
})
const insertUserSchema = createInsertSchema(users).extend({
firstName: z.string().min(1, { message: 'First Name is required' })
})
(https://drizzle.run/wiprbk7utfa5fzlxztql077e)
DiamondDragon
DiamondDragonOP4mo ago
Ok I’ll check it out today. Thanks
Want results from more Discord servers?
Add your server