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

Descriptions don't work on optional fields #280

Closed
dlip opened this issue Apr 4, 2023 · 1 comment
Closed

Descriptions don't work on optional fields #280

dlip opened this issue Apr 4, 2023 · 1 comment

Comments

@dlip
Copy link

dlip commented Apr 4, 2023

This doesn't seem to work:
z.string().optional().description('my description')
But this does
z.string().description('my description').optional()

@jlalmes
Copy link
Owner

jlalmes commented May 24, 2023

Interesting! Probably a bug with zod - could you open an issue over there please 🙏

@jlalmes jlalmes closed this as completed May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants