A user kept getting an email validation error when entering his email
address (ex: [EMAIL PROTECTED]) on one of our sites that uses Struts.
Apparently, the Struts email validation doesn't like the 4 character domain
qualifier (.info in this case - I believe there may be others).

I looked in validateEmail.js which is in commons-validator.jar and found the
following code:
               var domArr=domain.match(atomPat);
               var len=domArr.length;
               if ((domArr[domArr.length-1].length < 2) ||
                   (domArr[domArr.length-1].length > 3)) {
                   return false;
               }
               if (len < 2) {
                   return false;
               }


It looks like any domain qualifier greater than 3 is returning false in the
checkEmail function.
Is this a bug and/or can I extract the validateEmail.js file and make the
change and then re-jar commons-validator.jar?

I searched the archives and didn't find any mention of this.

Thanks,
Jeff

Reply via email to