Passing external validation errors into the form - is there a neater way? #1181
Unanswered
patrickbenjamin1
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I feel like I'm missing part of this puzzle - why not use |
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
-
I'm using tanstack forms with server based validation errors, what looks like the best approach I've found for getting those errors into the form's state is the following:
But this throws the error
Uncaught error: TypeError: Cannot read properties of undefined (reading 'baseStore')
There's also no type safety in anything in setErrorMap - onServer is just typed as unknown
In my case, i'm in a component which just contains the form, which gets passed an onSubmit and an error from the wrapper.
Is there something glaring that I'm missing? I can't see anything in the documentation for my case
Beta Was this translation helpful? Give feedback.
All reactions