Replies: 2 comments 2 replies
-
Ok - I've got reproduction: https://stackblitz.com/edit/vitejs-vite-afsrrjgd?file=src%2FApp.tsx I've also noticed that the errors are cleared when one of the form fields had the focus at the time it was added and is interacted with in some way - including losing focus. If you manually click on the "Submit" button then you don't get the problem immediately, but you will get it if you then put focus into one of the form fields. Cheers |
Beta Was this translation helpful? Give feedback.
-
I am facing same issue. The In general, there are no clear examples of how to interact with the form upon API failure. All the conversations and examples are around validation (server or client validation). I wouldn't even know about this |
Beta Was this translation helpful? Give feedback.
-
I'm using the
onServer
error type for setting errors that have resulted from calling the backend server on form submission. And this works well.However, I've noticed that the errors set in this way seem to get reset as soon as the form is interacted with in any way - including just moving focus out of one of the fields.
Is this expected behaviour? Or am I doing something wrong here?
I'll try and get a working example to show the behaviour but it'll probably be tomorrow now...
Cheers
Beta Was this translation helpful? Give feedback.
All reactions