Trigger error in specific field from the onSubmit function
When I submit my form, my backend api can return an error if the sourceName field is already taken. How can I set this error in this field from the onSubmit fn ?
3 Replies
fair-rose•16mo ago
This feature is WIP. I just need to review the PR and we can merge it
absent-sapphireOP•16mo ago
Thanks, can I have the link of the related feature please ? So I can follow the thread
absent-sapphireOP•16mo ago
I found it 🙂 https://github.com/TanStack/form/pull/656
GitHub
feat: set field errors from the form validators by fulopkovacs · Pu...
This PR adds the ability to set field errors from the form validators.
The API would look like this (this is a value returned by a validator):
{
form: "General form error", // optional,...