struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter do Valle <>
Subject Does validwhen has a bug?
Date Tue, 10 Oct 2006 18:36:17 GMT
Hello all

I'm trying to use validwhen from Struts Validator without success. I tried 
everithing it is possible, but it doesn't work. I have a radio button and a 
text field.
My validation rule is: textfield is mandatory if certain option of my radio 
is cheked. See below. In other words, if radio called tipoDivisao is "I" 
then qtPartes is mandatory.
The integer and intRange validation works perfectly. ValidWhen doesn't.
Is there something wrong? Any help is welcome.
If somebody has an example like this, please send me. 


<html:radio property="tipoDivisao" styleId="tipoDivisao" value="P">
<html:radio property="tipoDivisao" styleId="tipoDivisao" value="I">
<html:text property="qtPartes" size="3" maxlength="3" styleId="qtPartes" 

My validation.xml:

<form name="pdfForm">
  <field property="qtPartes" depends="integer,intRange,validwhen">
     <arg0 key="index.qtPartes"/>
     <arg1 name="intRange" key="${var:min}" resource="false"/>
     <arg2 name="intRange" key="${var:max}" resource="false"/>
	  ( (tipoDivisao != "I") or (qtPartes != null) )

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

View raw message