Open edvein-rin opened 6 months ago
Describe the bug The bug is another version of #118.
Cyryllic script inside a validator message failes regex during schema generation. Here is an example with Ukrainian language:
datasource db { provider = "postgres" } generator zod { provider = "zod-prisma-types" } model Court { id String @id @default(uuid()) /// @zod.string.max(100, { message: "Максимальна довжина назви 100 символів" }) name String /// @zod.string.max(100, { message: "The max length is 100 characters" }) description String }
Expected:
export const CourtSchema = z.object({ id: z.number().int(), name: z.string().max(100, { message: "Максимальна довжина назви 100 символів" }), description: z.string().max(100, { message: "The max length is 100 characters" }), })
Actual:
export const CourtSchema = z.object({ id: z.number().int(), /** * .max(100, { message: "Максимальна довжина назви 100 символів" }) */ name: z.string(), description: z.string().max(100, { message: "The max length is 100 characters" }), })
Package versions (please complete the following information):
Please! Fix this issue 👍
Hello! I recently encountered this problem too and fixed it in a fork of this repo. Here's the link: Repo If you want to, you are welcome to try and merge it into this repo.
Describe the bug The bug is another version of #118.
Cyryllic script inside a validator message failes regex during schema generation. Here is an example with Ukrainian language:
Expected:
Actual:
Package versions (please complete the following information):