struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eirik Kj°lsrud" <wayb...@frisurf.no>
Subject Re: Validation : No client message presented. Please help.
Date Wed, 04 Jun 2003 09:21:15 GMT
Hi again.

Krishnakumar N posted a fix for this as a reply to my first post.

> I think this is a bug with the validator-rules.xml that ships
> with rc1. The integer validation javascript may need to be
> changed slightly as follows:
>
>
> ...
>                             if (!isAllDigits(value)) {
> ++                                 if (i == 0) {
> ++                                     focusField = field;
> ++                                 }
> ++                                 fields[i++] = oInteger[x][1];
>                                 bValid = false;
>                             } else {
>                             var iValue = parseInt(value);
>                             if (isNaN(iValue) ||
> !(iValue >= -2147483648 && iValue <= 2147483647)) {
>                                 if (i == 0) {
>                                     focusField = field;
>                                 }
>                                 fields[i++] = oInteger[x][1];
>                                 bValid = false;
>                            }
> ...


Thanks,
Eirik

"Eirik Kj°lsrud" <wayback@frisurf.no> skrev i melding
news:bbk68g$eaq$1@localhost.localdomain...
> Hi.
>
> I still haven't been able to solve the problem from my post yesterday,
which
> basically is that if I use 'required' validation, a javascript alert
informs
> the user on the client side if a field is not filled in, it works
perfectly.
> However, if I try to use 'integer' validation the alert message does not
> present itself. The field is validated though, I'm not allowed to submit
the
> form before the fields have integer values, but no message is presented.
The
> errors.integer message is set up in ApplicationResources.properties.
>
> Any thoughts on why this is not working ?
>
> Best Regards
> Eirik Kj°lsrud, Norway




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message