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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for .default on schema definition #81

Closed
Just-Moh-it opened this issue Jul 12, 2023 · 1 comment
Closed

Docs for .default on schema definition #81

Just-Moh-it opened this issue Jul 12, 2023 · 1 comment

Comments

@Just-Moh-it
Copy link

I read the docs and wasn't able to find how to access the value of .default() that's defined in a zod schema like

const firstName = z.string().default("Mohit");

would be great if we could add this to the docs for beginners! 馃檪

@StefanTerdell
Copy link
Owner

Not sure I undertand the issue 馃檭

I'm not going to document everything the code does. By that point it's just code again

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