In the user guide it says "Only two items may be joined with and or or"

http://struts.apache.org/userGuide/dev_validator.html

I haven't tried three things but maybe it would work with an extra pair of
brackets

<var-value>(((item1 != null) or (item2 != null)) or (*this* !=
null))</var-value>

Niall


----- Original Message ----- 
From: "Laurent Duperval" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 26, 2004 4:35 PM
Subject: Re: Implementing dependence between form properties


> Joe Hertz wrote:
> > Something like this if youre using 1.2.x:
> >
> > <field property="propName" depends="validwhen">
> > <var>
> >    <var-name>test</var-name>
> >    <var-value>((item1 != null) or (item2 != null) or (*this* !=
> > null))</var-value>
> > </var>
> > </field>
> >
>
> Thanks. Is this supposed to work with DynaActionForm's? I tried it and
> it still seems to pass the validation. Finally, do I have to do this for
> all three fields or is the above code sufficient?
>
> I'm wondering if something isn't smelly in my setup. I change the (item1
> != null) to use a name that doesn't exist in my form but there was no
> reaction; the validator didn't seem to pick up that it was incorrect.
>
> Thanks,
>
> L
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

Reply via email to