struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashish Kulkarni <kulkarni_ash1...@yahoo.com>
Subject How do i do this validation in struts using validWhen
Date Tue, 01 Nov 2005 14:10:22 GMT
Hi
Suppose i have entry text fields on a jsp, named ttype
and comment,
i want to add a validation saying that if ttype='2',
then comment cannot be blank, if ttype='3' or any
other value then comment can be blank,

what i am trying is following
<form name="ContractApprovalForm">
 <field property="comment" depends="validWhen">
	<arg0 key="errors.comment" />
	 <var>
        <var-name>test</var-name>
<var-value>(ttype==2) and (comment !=
null)</var-value>
        </var>
 </field>
</form>
Will this work

Ashish


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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


Mime
View raw message