Theo's Typesafe CultTTC
Theo's Typesafe Cult4y ago
10 replies
utdev

Id in zod schema for frontend and backend?

Hi guys I am saving a "client" in my backend for that I have following basic schema, which is used in my frontend and backend
const clientSchema = z
  .object({
    id: z.string().nullish(),


I am not sure should I set the
id
to nullish or should it no be nullish?
Was this page helpful?