Skip to content

What's the intended way to create a conditional schema? #771

Answered by fabian-hiller
mwskwong asked this question in Q&A
Discussion options

You must be logged in to vote

Your approach is perfectly fine. I would write it the same way. You only need lazy for recursive schemas, or if you create a schema depending on the input or an external value that may change over time. But process.env.VERCEL is most likely a static value.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mwskwong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants