You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by je...@ca.ibm.com on 2005/01/04 20:03:13 UTC
Validate a field only if a checkbox is checked
Hi,
I want to know, how can I validate a field that must contains a date
with the DatePattern ONLY IF a checkbox in my form is checked? For now, I
have this, but it doesn't work at all:
<field property="startDate" depends="validWhen, date">
<arg0 key="searchLots.error.invalidStartDate" />
<var>
<var-name>test</var-name>
<var-value>(customerIdFlg == null)</var-value>
</var>
<var>
<var-name>datePattern</var-name>
<var-value>yyyy-MM-dd</var-value>
</var>
Anyone have a idea? Thank you.
-----------------------------------------------------------------------------
Jean-Francois Croteau
Services Informatiques
IBM Canada Ltée (Bromont)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org