-
|
I'm just getting into using TanStack Start. I have my own form/schema validation solution, that I would like to use with it. However, trying to figure out things such as how to return an error in
It appears as soon as you want to stray from the expected usage, the docs are not very useful. Am I missing something? I've looked all over. |
Beta Was this translation helpful? Give feedback.
inputValidatordoes not have to be Zod-specific. The function just needs to take the incoming data and return the validated/transformed data, or throw if the input is invalid.With a custom validator, the shape is roughly:
If your validation library returns structured errors, wrap those in your own error type, or throw a response/error shape your app knows how to display.
Th…