Yes, I also later found it mentioned on the Struts wiki that you can upgrade
to the latest version of Validator.  I had just assumed that the latest
Struts also contained the latest Validator without checking it out.  (You
know what they say when you assume)

I did bring in the latest Validator 1.3.0 into the Struts application and
the email validation did accept the .info TLD correctly.

Thanks,
Jeff


On 4/12/06, Niall Pemberton <[EMAIL PROTECTED]> wrote:
>
> On 4/6/06, Jeff Deskins <[EMAIL PROTECTED]> wrote:
> > 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?
>
> This has already been reported in bugzilla and fixed:
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=31644
>
> Try upgrading to the latest Validator 1.3.0 version:
>
> http://jakarta.apache.org/commons/validator/downloads.html
>
> Niall
>
> >
> > I searched the archives and didn't find any mention of this.
> >
> > Thanks,
> > Jeff
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to