struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruben <>
Subject Re: is it possible to define a validation that runs only server side or client side (validation.xml )
Date Thu, 25 Mar 2004 09:08:29 GMT
Seyhan BASMACI (Internet Yazilimlari Yetkilisi) wrote:

>I have a LoginForm form extends ValidatorForm and I want to decide 
>a validaton runs only on the server or client side, (or both )
>is there any way to do this_? 
> <form name="LoginForm">
>      <field property="userno" depends="required">
>        <arg0 key="caption.wusernono"/>
>      </field>
> </form> 
>To unsubscribe, e-mail:
>For additional commands, e-mail:
if you want to call th javascript validation you only have to call the 
validateLoginForm(form); if you don't call this function, client side 
validation is not called.
the case of server side validation is more complex, if you only want to 
call the client side validation and not the server side, you have to 
overwrite the method validate of the ActionForm, and do nothing on it, 
returning null.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message