struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Bathje <>
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:

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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message