Open edvein-rin opened 1 month 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):
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):