Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

I'm working on a registration form and it validates some parts while the user is still typing. For example, the username is being checked after each character is entered to see if it is available or taken. A field beside the input is updated telling the user whether or not the name is available.

The e-mail address is going to be validated as well. I'm wondering if it should be validated after the Submit button for the form is clicked or if it can be validated after each character is typed? One idea is to hold off auto-validation until 10 characters are typed (this could be done for the other inputs as well).

Is this constructive for users? Is there a better/more correct way to do validation of form input fields?

share|improve this question
3  
If you provide character by character validation of email address, you are making it really easy on hackers to find emails from your system. –  James Jenkins Jun 3 '13 at 19:02
2  
@JamesJenkins I'm not sure you understand correctly, when the user enters the e-mail address it is being validated by checking for things such as @ and .com etc. so obviously asdfdsfsdfisn't and e-mail address. –  Celeritas Jun 3 '13 at 19:34
    
@JamesJenkins: I guess validating the email for having the traditional email syntax is enough (i.e email@domiain.com). Validation of existence of the e-mail address may lead to the problem your are point-out. –  Adil Soomro Jun 4 '13 at 12:56
    
@AdilSoomro, not sure what the rationale would be for validating it before the whole thing was entered. There are some tools available that will ping for a connection to validate the email. And any other validation does not add value. "NoSpam@MyCustomDomain.1/10000SLD" is either going to be real or not, and the rules for checking to see if it is valid are going to be hugely complex, and would need to be updated regularly. Or you could just allow only user who have email with AOL... –  James Jenkins Jun 4 '13 at 15:12
    
@Celeritas do you have any idea how may varations of .com etc there are? Even if you get them all, what value does it add to your tool? –  James Jenkins Jun 4 '13 at 15:15

3 Answers 3

Instant feedback is a good feature to have. It makes for a smoother experience.

In form entry validation, I generally see three main trends:

  • Validate after each character entry - Instant feedback
  • Validate after each input field (once you leave the field) - Delayed feedback
  • Validate on submission - Delayed, user initiated, feedback.

The last method is lesser and lesser used since now we have enough capability to provide immediate feedback.

There are pros and cons of both the first and second approach.

Instant feedback:

  • Makes it real easy to pick unique usernames and other such inputs
  • Really annoying in email and password validations and similar fields (Volley of errors till the end of input)

Delayed feedback:

  • Not instant and hence sort of trial and error if looking for unique usernames and such
  • Also, in the last field in the form, the user needs to click somewhere outside the box to see the validation (before pressing submit)
share|improve this answer
    
For instant feed back of passwords what makes you say it's really annoying? The way I have it setup now is if the password is too short the message says "too short" and if the password is not complex enough the message says "too simple in red". If it's a phrasing problem the words can be changed. –  Celeritas Jun 3 '13 at 19:41
    
@Celeritas Seeing continuous errors is 'annoying' for me. While your password may be a valid one, but when you are typing it, it is invalid for quite some characters. I understand what it is doing, still, it is annoying. For a non-web-adept user, it can even lead to unwanted situations. –  rk. Jun 3 '13 at 19:43
    
What if it had a count down? For example "too short...5 more characters to go", "...4 more" etc.? I try to play it up since it doesn't appear as an error (not in red). Is your suggestion to do all password validation after the selected input field is moved? –  Celeritas Jun 3 '13 at 19:46
1  
I think I confused you :) I am not suggesting not to use the instant feedback for passwords. The methods you suggested are exactly what is needed. Guide the user to the required outcome and not just alert incase of errors. Conclusion: Give guiding remarks in such cases, rather than just plain errors. –  rk. Jun 3 '13 at 19:54
    
The validation script could be smart enough to start validating after user stops input but still inside current input field! This can be named as delayed instant feedback ). –  Alexey Kolchenko Jun 4 '13 at 7:34

It depends on the field being filled out. According to Luke Wroblewski [Inline Validation in Web Forms], there are some fields which can benefit from immediate validation and others which can slow the user down.

The method of validation you missed falls right in the middle of your listed options: field-level validation. In most cases, field-level validation will provide a happy medium.

For instance, you don't want to provide immediate validation on a first or last name. What would you be validating against? Likewise, users will be annoyed at an email field that glows red when they are in the middle of entering an address because the expected "." hasn't been reached yet.

If a user is in the process of entering a username "WillCode4Food", they don't care that "WillC" "WillCo" or "WillCod" are available as it's being typed in. In this situation, validating at the field-level, not character-level, will be much more meaningful and valuable to the user.

share|improve this answer

Validation while the user is still typing can get very tricky and it runs the risk of getting in the way of the form. As an example, there are a few things that the jQuery Validation Plugin does well (demo):

No validation until a field with input is navigated away from. When you first start the demo, the Email fields does not have a warning, but if I click into the field and type anything (invalid) and leave the field, it will warn me. This is kind of where you are going with your 10 character limit, but I don't think the characters is the right way to trigger the validation. I prefer the method of this tool.

I've seen so many people get form validation wrong, by doing things like the 10 character limit, which can provide bad results for the user. However, when done right, I believe it is more effective then validation on submission. Mainly because, when a user tries to submit a form with errors, sometimes the errors are not called out well, which is not a risk when the user is already focues on the field with an error.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.