You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Currently, onSubmitInvalid is designed to be called only once, due to this line of code. This behavior limits flexibility for handling invalid form submissions, as it prevents custom logic from being executed during validation.
Use Case
I want to implement functionality where, if the form is resubmitted, the next field that still has an error gets focused. However, since onSubmitInvalid is only called once, this behavior isn't currently possible without workarounds.
Proposal
Remove the guard to allow onSubmitInvalid to be called multiple times, or provide an explicit option to opt out of the current restriction.
The text was updated successfully, but these errors were encountered:
I just ran into the same issue when trying to integrate Tanstack Form with React Aria Components.
My use case is exactly the same as described above - managing focus on invalid states. This is indeed possible with some "hacky" workarounds but being able to run the logic inside onSubmitInvalid would make things a lot cleaner.
Description
Currently,
onSubmitInvalid
is designed to be called only once, due to this line of code. This behavior limits flexibility for handling invalid form submissions, as it prevents custom logic from being executed during validation.Use Case
I want to implement functionality where, if the form is resubmitted, the next field that still has an error gets focused. However, since
onSubmitInvalid
is only called once, this behavior isn't currently possible without workarounds.Proposal
Remove the guard to allow
onSubmitInvalid
to be called multiple times, or provide an explicit option to opt out of the current restriction.The text was updated successfully, but these errors were encountered: