struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: XML Validation
Date Sun, 12 Jul 2009 05:26:38 GMT
Muhammad Owais wrote:
> Dear All;
> I wnat to validate a String that is similare to "1,102,Y".I was trying to implement it,
but it is not working.
> <field property="scheduleDateStr" depends="requiredif">
 >   <arg0 key="label.scheduleDateStr" />
 >   <var>					
 >     <var-name>field[0]</var-name>					
 >     <var-value>actionType1</var-value>
 >   </var>				
 >   <var>
 >     <var-name>fieldValue[0]</var-name>
 >     <var-value>1,102,Y</var-value>
 >   </var>
 > </field>


Here it looks like you're trying to use "requiredif", which is a 
deprecated validator used for conditional validation, to validate the 
format of a string, which would normally be handled by a regular 
expression (or manual validation) -- the "mask" validator.

Note that "requiredif" is deprecated for "validwhen", but you don't 
mention what version of Struts you're using, so I don't know if that's 
useful information or not.

Dave

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


Mime
View raw message