?

Log in

No account? Create an account

Previous Entry | Next Entry

Email Address Validation

Email address validation always seems to be difficult. In reality, it's not difficult, it's just tedious. I tend to find a lot of broken email validators because my email address is a bit less than common.

Today, I was using the "Contact Us" Form at my credit union and ran into a validation error on my email address. I had a little time, so I decided to look for the javascript that was causing the problem. I found it, and it was pretty easy to spot, so I decided to send the credit union another message:

My email address (greg@cohoon.name) is reported as invalid by this form. Please submit a bug report to your developers and have them correct the logic in the "isEmail" javascript function on the https://www.truliantfcu.org/includes/validations.js page. Currently, assumption #4 is incorrect, as not all TLDs are simply 2 or 3 characters. To get around the ".name" issue, the following code can be used for the last portion of "reg2":

([a-zA-Z]{2,3}|name|[0-9]{1,3})

However, fixing the code in that manner would still cause it to consider addresses ending in ".info", e.g. to be invalid. A better solution would be to determine the actual rules governing the naming of TLDs and implement a correct validation algorithm.

It looks like you have the same bug in the "isURL" function.

I'm interested in seeing what sort of customer service response a "contact us" message like this will generate.

Ironically, I am currently wearing my "No, I will not fix your computer." shirt.

Comments

docwoodstock
Oct. 7th, 2007 06:58 pm (UTC)
My employer is a (dot)aero .aero

Most places still are not accepting that as an e-mail domain

Latest Month

June 2013
S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Page Summary

Powered by LiveJournal.com
Designed by Tiffany Chow