TanStackT
TanStack3y ago
4 replies
ordinary-sapphire

Validate on change only after the first submit

Hi,

From my point of view, the best validation is done "on change" but only after the first submit. For instance, the first name must be minimum of 3 characters but I don't want to display an error as soon as the user starts typing their first character (or 2nd, which is still not enough to pass validation).

However, once the user has tried to submit the form, and is fixing all the errors, I want live feedback = on change.

What is the best way to implement this logic using this library?

Thanks!
Was this page helpful?