Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Can't use z.literal with template string #231

Open
lambertkevin opened this issue Jan 3, 2024 · 0 comments · May be fixed by #232
Open

[BUG] Can't use z.literal with template string #231

lambertkevin opened this issue Jan 3, 2024 · 0 comments · May be fixed by #232
Assignees
Labels
bug (unconfirmed) Could be a bug

Comments

@lambertkevin
Copy link

lambertkevin commented Jan 3, 2024

Describe the bug
Using a zod.custom.use(z.literal(`foo${number}`) is impossible as it breaks the comment while generating the schema.

Screenshots
schema.prisma:
Capture d’écran 2024-01-03 à 20 15 57
Result:
Capture d’écran 2024-01-03 à 20 16 09

Package versions (please complete the following information):

  • zod: 3.21.1
  • prisma: 5.7.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug (unconfirmed) Could be a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants