On Sat, 15 Jan 2005 15:18:33 +0530, Vamsee Kanakala
<[EMAIL PROTECTED]> wrote:
> Hi List,
> 
> I have something like this in my validation.xml:
> 
> <field property="stdCode" depends="validwhen">
>     <arg0 key="entry.std"/>
>       <var><var-name>test</var-name>
>          <var-value>
>                   ((phone != null) or (mobile == null) or (*this* != null))

(((phone != null) or (mobile == null)) or (*this* != null))


>          </var-value>
>       </var>
> </field>
> 
> But I have some errors like this:
> 
> line 1:38: expecting RPAREN, found 'or'
>    at antlr.Parser.match(Parser.java:213)
>    at
> org.apache.struts.validator.validwhen.ValidWhenParser.expr(ValidWhenParser.java:384)
>    at
> org.apache.struts.validator.validwhen.ValidWhenParser.expression(ValidWhenParser.java:369)
>    at
> org.apache.struts.validator.validwhen.ValidWhen.validateValidWhen(ValidWhen.java:114)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ...
> 
> I checked Struts Validator guide, I can't find anything wrong with the
> validation rule. Please help. I also have a doubt: Can I also use 'and'
> in the above cases, if I need it?

http://struts.apache.org/userGuide/dev_validator.html
Probably you missed the validWhen rules; Search for "A few quick notes
on the grammer" on the above page


> 
> TIA,
> Vamsee.
> 
> ---------------------------------------------------------------------
> 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