designtrooper — 2013-07-25T12:20:22-04:00 — #1
So far, in registration forms, I perform client-side validation the moment the user clicks the sign-up button.
At that point error messaged appear in the form(ex.e-mail has not the right form)besides the input elements.
My question is if you think it is better to perform the validation(we are always talking about client- side here) AT THE MOMENT the user
fills the input fields...like twitter does for example.
I think this is called live validation.
picnictutorials — 2013-07-25T13:16:54-04:00 — #2
Better to only show an error when they make one.
designtrooper — 2013-07-25T13:21:57-04:00 — #3
And what this translates to...using live validation?
picnictutorials — 2013-07-25T13:22:56-04:00 — #4
I guess. Jquery validation plugin is like this.
felgall — 2013-07-25T16:59:45-04:00 — #5
Just before thre form is submitted you validate all of the fields (including cross field validation) to save a visit to the server if the errors can be detected without reference to the server.
As each field has been updated you can perform any validation specific to that field.
As each character is entered into a field you can validate whether that character is valid for that field and discard any that are not allowed.
The first of these is attached to the submit event. The second of these is attached to the blur or change event. The third of these is attached to the keypress or keyup event.
Apart from the event triggering the validation the coding of the functions to validate complete fields for both 1 and 2 above is the same. The functions for validating 3 will be slightly different as they validate individual characters rather than the complete field.
stomme_poes — 2013-07-28T10:50:10-04:00 — #6
CSS valid and invalid states do this (validate before you even had a chance), and basically it's telling me I'm a freaking retard before I even get the chance to prove that. Which is annoying to the max.
It's like insulting people as they walk into your house, and then if they don't act like jerks, apologising and welcoming them belatedly in. Bleh.
Onblur validation can be useful or annoying, and I would say test that per input on people. Like if users are asked to repeat an email address or password, it's nice to know right away that they don't match, rather than waiting til you get to the bottom and try to submit.
truegether — 2013-08-07T18:14:46-04:00 — #7
Take a look at how jquery validation works ( as an earlier responder pointed out ).
jquery validation kicks in on blur.
If you enter a valid input and tab away from it there are no errors ( obviously ).
But if user entered an incorrect input, the user immediately sees an inline error.
IMHO this is better than waiting for the user to fill out the complete form, click submit and then show all errors at once.
picnictutorials — 2013-08-07T20:46:01-04:00 — #8
Sites that need it yeah ok validate the inputs info you need. But for a simple contact form I only validate the (JS at least) the spam captcha. If they don't want to give me there email so be it. I won't email you back. I do validate with php for spam sh*t in the inputs though.