Closed andenacitelli closed 1 year ago
I have this line in my Prisma schema:
currentUniversalCashbackPercentage Float @default(0) /// @zod.number.min(0).max(100)
I get this error on generating:
[@zod generator error]: Validator 'min' is not valid for type 'Float', for specified '@zod.[key] or for 'z.array.[key]'. [Error Location]: Model: 'Filters', Field: 'currentUniversalCashbackPercentage'.
Switching to gte() works fine. Relevant section of the zod docs: https://github.com/colinhacks/zod#numbers
gte()
zod
@andenacitelli is now implemented in latest version
Nice, excellent work @chrishoermann!
I have this line in my Prisma schema:
I get this error on generating:
Switching to
gte()
works fine. Relevant section of thezod
docs: https://github.com/colinhacks/zod#numbers