Open michiim opened 2 years ago
if useDecimalJs = true is defined, the helper schema for Decimal fields is created but not used.
details:
creates Helper (without assignment to const)
z .instanceof(Decimal) .or(z.string()) .or(z.number()) .refine((value) => { try { return new Decimal(value) } catch (error) { return false } }) .transform((value) => new Decimal(value))
does not use it in schema (ex. property price)
export const product = z.object({ id: z.string(), name: z.string(), price: z.number().nullish(), })
@michiim @CarterGrimmeisen Did you find a fix for this? Is it possible for me to use the 1.0-beta branch instead on my project (which has this fix)
Can I do this?
@ElhanM zod-prisma is dead. Use https://github.com/chrishoermann/zod-prisma-types instead.
if useDecimalJs = true is defined, the helper schema for Decimal fields is created but not used.
details:
creates Helper (without assignment to const)
does not use it in schema (ex. property price)