You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by starki78 <st...@libero.it> on 2006/03/28 09:56:01 UTC

Need help with my validwhen-Example

Ciao, 
would someone be so kind to support me with the following problem:

A date field should just be validated 
if another checkbox isn't used:


the name of the other Form property that should also be used for the test
(as the condition is selectionForShift[0].checked (true or false)


I'm not sure how to make it:
<form name="ItemForm">
          <field  property="time" depends="validwhen,date">
               <arg0 key="error.form.time"/>
               <var>
                <var-name>test</var-name>
               <var-value>(selectionForShift            
                    [0].checked==true)       
                    </var-value>
               </var>
               <arg0 key="error.form.time" bundle="PROD_TLV"/>
                 <arg1 name="date" key="${var:datePatternStrict}"  bundle="PROD_TLV" resource="false"/>
                  <var>
                    <var-name>datePatternStrict</var-name>
                    <var-value>HH:mm</var-value>
                  </var>
          </field>
        
        </form>

Some help would be highly appreciated as I'm really getting mad with this

Thanks a lot




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