Skip to content

min() together with optional() #553

Answered by medihack
medihack asked this question in Q&A
Discussion options

You must be logged in to vote

As more as I think about it, z.string().min(8).max(100).or(z.string().max(0)) seems to be completely ok and optional is not the correct way to do this. I also closed the issue.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@medihack
Comment options

Comment options

You must be logged in to vote
2 replies
@scotttrinh
Comment options

@medihack
Comment options

Answer selected by medihack
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