On the javascript side, there is no javascript "validwhen" validation - its
server side only.

On the server side problem, because its an XML file I don't think you can
use the > symbol - try replacing it with >

 <var-value>(*this* &gt; startDate)</var-value>

One last thing, I don't know if its going to affect you, but there was a bug
fix for a problem in v1.2.4 with validwhen and numeric compares - it was
fixed in v1.2.6

http://issues.apache.org/bugzilla/show_bug.cgi?id=31514

Niall

----- Original Message ----- 
From: "Sivakumar Santharam" <[EMAIL PROTECTED]>
Sent: Wednesday, March 16, 2005 10:25 PM


> There are two fields in the form.I tried to use validwhen to validate one
of
> against the others like below.
>
> <field property="endDate" depends="required,integer,validwhen">
>   <arg0 key="end.date"/>
>   <var>
>     <var-name>test</var-name>
>     <var-value>((*this* > startDate))</var-value>
>   </var>
> </field>
>
> Basically I am trying to throw an error if the end date is greater than
the
> start date.
>
> Even though I have included the client side validation, I don't see the
> validwhen javascript method generated and called. But I get the following
> error when the server side validation is called. I am using struts 1.2.4.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to