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

Add --strict to generate z.object().strict() #11

Closed
wants to merge 2 commits into from
Closed

Conversation

fabien0102
Copy link
Owner

Description

Add --strict to generate z.object().strict()

Related issue

#8

Blocked by

colinhacks/zod#390

Todo

  • Add strict flag to example and config

@fabien0102
Copy link
Owner Author

Will close this for now, .strict() is not really necessary and have some problem with .and()

@fabien0102 fabien0102 closed this Apr 27, 2021
@fabien0102 fabien0102 deleted the strict-mode branch February 22, 2022 09:06
@notflip
Copy link

notflip commented Dec 7, 2022

Is there any other way to enforce the strict mode when using this package? For my use case it's important to have strict checking enabled.

@fabien0102
Copy link
Owner Author

Hey @notflip, sorry, nothing so far, you can add .strict() to the generated schema.

The main problem was the .strict() combined with .and() if I remember well, you can try to fork this branch and see if this is working for your usecase.

@notflip
Copy link

notflip commented Dec 12, 2022

No worries! Thanks for letting me know!

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

Successfully merging this pull request may close these issues.

2 participants