2 ms·
A user makes a mistake in typing email, adds in rest of form. Presses submit. Form takes 3s to send. Throws validation error and highlights email. User corrects
by Joakal 16y ago
A user makes a mistake in typing email, adds in rest of form. Presses submit. Form takes 3s to send. Throws validation error and highlights email. User corrects it and sends it again (hopefully you're not punishing your users by clearing the form).
Or, you could present client-side validation which alerts user on focus out.
Other uses for client-side validation:
+ Multiple emails (Gonna verify them all in many calls?)
+ Prerequisite for further steps
Of course, have server-side validation. Client-side validation is convenience for the user.