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]