In the event that parsing of some fields fails, how to set a value to catch that failure #452
Answered
by
fabian-hiller
yutakobayashidev
asked this question in
Q&A
-
In Zod, you can specify a value to be set when parsing of some values fails using .catch. Is there a similar solution in Valibot? |
Beta Was this translation helpful? Give feedback.
Answered by
fabian-hiller
Feb 25, 2024
Replies: 1 comment
-
Yes, we call it |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
fabian-hiller
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, we call it
fallback
: https://valibot.dev/api/fallback/