Optional number with gt(0) #2700
Replies: 2 comments 1 reply
-
Ok, after some more googling I am starting to grasp how zod works.
Edit:
|
Beta Was this translation helpful? Give feedback.
-
Also note that it is essential to switch from |
Beta Was this translation helpful? Give feedback.
-
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