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-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to