struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fea jabi" <>
Subject validwhen for double value comparision
Date Mon, 16 Oct 2006 18:19:07 GMT
Need to check if the value entered is greater than zero.

Tried the below using the validwhen

<field property="payment" depends="required,validwhen">
            	<msg name="required" key="error.required"/>
                <msg name="validwhen" key="error.gtzero"/>
                    <var-value>(*this* > "0.00")</var-value>

validation seams to be working right when entered 0,0.00,any string, any 
negative number all give validation error. which is exactly what I wanted. 
Is this really doing the validation right i.e checking if the value entered 
is greater than zero?

Is this the right way to do? or do I have to create the custom validator to 
do double value comparision?


Use your PC to make calls at very low rates

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

View raw message