Replies: 1 comment
-
The above fails. What is the best way for me to convert a check if a string contains a valid number, then convert it to a number and perform additional validations? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to build a custom Zod validator as follows:
The above does not work and always returns success as true. If I throw an error instead of
return false
, the error gets thrown and execution stops although I have used safeParseI further want to extend the validation using the inbuilt Zod functions like min, max as follows
How can I achieve this?
Beta Was this translation helpful? Give feedback.
All reactions