Optional number with gt(0) #2700
Unanswered
marisancans
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Ok, after some more googling I am starting to grasp how zod works.
Edit:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, i'm struggling to grasp how to achieve this:
A. Return the value as null / undefined (whatever goes better with mongodb)
B. Dont return it at all (Even better for mongodb)
Here is how far I have gone before hitting a brick wall:
Using coerce kind of works but it returns 0 if no user input is given which is not what I want
Beta Was this translation helpful? Give feedback.
All reactions