Friday, December 21, 2012

Epic Fail at Vodafone.ie

At perhaps the busiest time of the online shopping year Vodafone.ie is turning away all customers, because of a user input validation error. Very few e-mail address are being accepted by the site. I e-mailed them about it last night. It will be interesting to see how long it takes them to fix it. I'd love to know see the hourly online sales figures.




We didn't cover the use of regular expressions for input validation in this module. But many students used them anyway. Here's the code used by Vodafone to validate the e-mail address. See if you can figure what kind of e-mail addresses it will take, any maybe bag one of those Nokia Lumia 800s that they have run out of in the shops.



var EmailTxtBoxCheck = function(controlToValidate) 
{

var RE_EMAIL = /^[a-zA-Z][a-zA-Z0-9\_\-\.]*\@[a-zA-Z0-9\-]*\.[a-zA-Z]{2,4}\.[a-zA-Z]{2,4}$/;

if (RE_EMAIL.test(controlToValidate.value))
   {
//HideError(controlToValidate);
return true;

   } 
else 
   {
//ShowError(controlToValidate);
return false;
   }
}

1 comment:

Anonymous said...

Hello.It will take email "colin.manning@cit.ie.ie"
Congratz for voodafone! MT