zod-prisma-types icon indicating copy to clipboard operation
zod-prisma-types copied to clipboard

Possible to omit only in CreateInputSchema but not UpdateInputSchema

Open NanFengCheong opened this issue 1 year ago • 1 comments

I have a use case where I wanted only to omit Id in CreateInputSchema but not UpdateInputSchemam but if I put /// @zod.custom.omit([input]). It will omit in both CreateInputSchema and UpdateInputSchema.

NanFengCheong avatar Mar 16 '23 06:03 NanFengCheong

@NanFengCheong Currently it is only possible to omit the fields in all input types. A similar request was made in #97. I'll think about how this could be implemented and see when I find some free time to work on it.

chrishoermann avatar Mar 16 '23 09:03 chrishoermann