You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eirik Kj�lsrud <wa...@frisurf.no> on 2003/06/04 09:11:36 UTC

Validation : No client message presented. Please help.

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


Re: Validation : No client message presented. Please help.

Posted by Eirik Kj�lsrud <wa...@frisurf.no>.
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" <wa...@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