Hi,

I am trying to check one of my forms for valid data. To do so, I check the
fields with a validation-main.xml
Everything seems to work as expected. Until I added this field .

<field property="laufleistung"
depends="required,double,doubleRange,validwhen">
        <arg key="label.laufleistung"/>
        <msg key="error.laufleistung.format" name="double"/>
        <msg key="error.laufleistung.logik" name="validwhen"/>

        <arg name="doubleRange" key="${var:min}" resource="false"/>
        <arg name="doubleRange" key="${var:max}" resource="false"/>
        <var><var-name>min</var-name><var-value>0</var-value></var>
        <var><var-name>max</var-name><var-value>9999999</var-value></var>
        <var>
        <var-name>test</var-name>
                <var-value>(((selectedTyp == 1) and (*this* < 300)) or
((selectedTyp > 1) and (*this* > 0)))</var-value>
      </var>
</field>        

If fails, because the test line for validwhen is not wellformed, because of
this comparation

(*this* < 300)

It works fine with a check for greaterThan, but it fails with the above
lowerThan...

Any Idea how I could change it to make it work ??

Rgds
Albi

PS:
I'm using commons-validator-1.2.jar, That's why I use 'arg' instead of
'arg0,arg1,arg2....'


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

Reply via email to