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.

For registration forms, it seems the trend now is to allow any password a user wants, as long as you inform him if it's weak.

With this in mind, should we still validate email fields on the client side, or do we assume that people by now have learned to type in their own email address without side wheels and a cheerleading squad?

Specifically,

  1. Does anyone have data on how often people actually make mistakes in typing in their own email address in an input field?

  2. Should one wish validation, is JavaScript the best option at the moment, or can CSS type="email" required provide a good user experience? (For instance, how do you tell the browser not to error-style the input field until the user has typed at least one character?)

(Security-checking should still be done on the server-side. When I am asking about here is user assistance.)

share|improve this question
    
Are you asking whether client-side validation should check that the email field entry's format is local-part@domain or are you asking whether the standard practice of requiring entry of the email address twice is still necessary? Both are forms of client-side validation but serve different purposes. The first validates data format. The second validates the user's intent, i.e., to provide an authentic or bogus email address. –  user1757436 Aug 21 '13 at 18:26
add comment

3 Answers 3

Don't "validate" on the client side. Email validation is actually a difficult problem and an enormous number of sites claim my email address is invalid. These sites also prevent my (perfectly valid) email address from being used. Getting it wrong can be detrimental, getting it right is tough.

On the client side, you can parse the email address to be helpful, but I recommend against preventing the user from proceeding. Instead, use the email system to validate the email. Send an email to the account with a link that "verifies" the address. This is the most accurate way to validate an email address and has the added benefit of preventing one person using another person's email address in registration.

mockup

download bmml source – Wireframes created with Balsamiq Mockups

It may be usefult to read this post:

http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx

share|improve this answer
    
I agree, but note that there are two issues here: a) validating the email format vs. b) validating that it's an actual email address. I think the question is only focused on 'a'. –  DA01 Aug 21 '13 at 17:37
    
@DA01 Precisely my point. Many designers/developers take "format" for "actual" thinking that, if the format is wrong, it must not be an actual address. This is the problem I caution against creating by validating the format and preventing progress. –  mawcsco Aug 21 '13 at 18:05
    
Gotcha. I think the warning is: If you're validating the format, make sure your validation is valid. :) –  DA01 Aug 21 '13 at 18:07
    
That's a valid point. –  mawcsco Aug 21 '13 at 18:07
    
After reading the comments here, and given the alleged complexity of accurately validating an email address, I'm inclined to let people register whatever email they want, and simply show an informative green checkmark with JavaScript if the input field contains an @ sign. If people fail to enter their email, they have most likely done so intentionally, will never receive the validation email, and must try again if they're serious about registering. And, yeah, normal people don't have backslashes in their email address. –  forthrin Aug 22 '13 at 7:07
add comment

Yes it's still very necessary. Email validation isn't just about people learning the email pattern, it's also for your own app's security, to prevent mindless inputs or potentially malicious inputs.

share|improve this answer
    
The security bit is done on the server side. My question was regarding client side assistance (edited). –  forthrin Aug 21 '13 at 15:16
add comment

Yes, it would be very wise to include email validation.

  1. About 1 out of 15 emails are invalid (by invalid I mean not in email format, to distinguish from valid emails that bounce back upon reply; see below for more).
  2. Do javascript inline validation on blur.

Due to technology constraints, one of my sites has a contact form with no email validation (and no email retype field). About 1 out of 15 emails are invalid - with people sometimes putting all sorts of garbage in (in all cases the message itself is from a real person - no spam). It's a site for music-technology enthusiastics, so most users should be fairly computer literate.

share|improve this answer
    
The 1 in 15 thing, I think is irrelevant. If your form has mandatory email field, but I don't see a need why you should have my email address, I'll type in trash that looks like email address to parsers, but isn't actually my email address. The solution to this is not by validating email address, but by not asking in the first place or making it optional and show why it is in my best interest to include my email address. –  Lie Ryan Aug 21 '13 at 17:21
    
You're mentioning a contact form, where people are less inclined to register their email. In a registration form however, I cannot imagine that people will intentionally fill in garbage. –  forthrin Aug 21 '13 at 18:36
    
Maybe I wasn't clear enough. The form is a contact me one; It has your name, your email, subject, message. How am I suppose to reply to someone unless they put their email address? –  Izhaki Aug 21 '13 at 18:44
    
@forthrin: quite the contrary, I'll be less inclined to fill in my real email address on a registration form. With contact form, I'm generally interested in a reply (might still not put in real email address if I just want to drop anonymous note, but that rarely happens), with registration, I'm only interested in getting whatever it is I'm registering for and if I can get by without providing real email address, then it shouldn't ask for email. –  Lie Ryan Aug 22 '13 at 2:46
    
Then I assume you are talking about a "one-off" situation where you just want something there and then and have no plans of coming back. If signing up for a renowned service you plan to use regularly, I assume most regular people fill in their email address. –  forthrin Aug 22 '13 at 6:57
show 1 more comment

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.