Closed nordowl closed 7 months ago
@nordowl sorry my bad. Since v. 3.0.0 the generator checks if decimal.js
is installed and if so adds validation for Decimal
to the fields. I just forgot a conditional check. I'll release a fix shortly!
@nordowl This should now be fixed in 3.1.6
Awesome, thank you! Can confirm this is fixed now. I'm closing this issue.
Describe the bug Generating the schemas having a
Decimal
field in a Prisma model results in an undefined variableDecimal
being used.z.instanceof(Decimal)
throws an error, becauseDecimal is undefined
.I was using zod-prisma-types 2.8.1 up until now, where the following was generated:
Package versions (please complete the following information):
Additional context I think the error was introduced with the 3.0 release. Was using 2.8.1 together with Zod and Prisma as listed above, without any errors.