struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter L. Berghold" <pe...@berghold.net>
Subject Conditional validation in Struts.
Date Wed, 04 Apr 2007 02:05:12 GMT
Consider the following sniglet from my validation.xml:

<field property="nonmember_dropin_rate_rq" depends="requiredif">
<arg0 key="label.nonmember_dropin_rate"/>
<var>
<var-name>field[0]</var-name>
<var-value>dropins_allowed_rq</var-value>
</var>
<var>
<var-name>fieldTest[0]</var-name>
<var-value>EQUALS</var-value>
</var>
<var>
<var-name>fieldValue[0]</var-name>
<var-value>on</var-value>
</var>
</field>

What I'm trying to accomplish is if the checkbox dropins_allowed_rq is
checked then I want to consider the text field nonmember_dropin_rate_rq
as a required field, otherwise ignore it. 

I've tried a few different variants and none have worked.  Pointers
anybody? 

(all my other validation works) 


-- 
Peter L. Berghold                               Unix Professional
Peter@Berghold.Net   AIM: redcowdawg YIM: blue_cowdawg
"Those who fail to learn from history are condemned to repeat it."

Mime
View raw message