struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Bathje <...@ntsource.com>
Subject Re: validwhen expression parsing anomaly
Date Tue, 21 Dec 2004 15:22:17 GMT
Reinhard Nägele wrote:
> I set up the following expression for a validwhen validation rule, which 
> produces the exception below:
> 
> <![CDATA[((*this* >= 1) and (*this* <= 6) and (*this* != null))]]>
> 
> Inserting parentheses that should not be necessary solves the issue:
> 
> <![CDATA[(((*this* >= 1) and (*this* <= 6)) and (*this* != null))]]>
> 
> I do actually consider this a bug. Should I enter one into the bug 
> database?
> 
> I'm using Struts 1.2.4 final.


This is a "feature", not a bug - see that second to last bullet point in 
the validwhen section of:
http://struts.apache.org/userGuide/dev_validator.html

which says:
- Only two items may be joined with and or or


Very weird, but it is also the documented behavior of validwhen.



> 
> BTW, the last validwhen example in the validator guide doesn't put the 
> expression in CDATA. Could someone please correct this?
> 

I don't see any of the validwhen examples enclosed in CDATA tags. Am I 
missing something? I am referencing the same page as above.


Matt

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


Mime
View raw message