Validation on form unfocus
Hi, i have this form
https://stackblitz.com/edit/vitejs-vite-nkfr5ek6?file=src%2FApp.tsx
1) on initial render validation works correctly, if you click inside the input and type 2 letters and then unfocus the errors are displayed.
2) however if on initial render you click the empty input, unfocus, and then click into it again and type 2 letters the errors show up immediately,
how can i get it so the errors only show after the user has unfocused just like the initial render in scenario 1 above
thanks
1 Reply
extended-salmon•9mo ago
Hmm... maybe add a check to the input.onBlur so that it's only calling the handleBlur function when the value has changed