struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fea jabi" <zy...@hotmail.com>
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>
                    <var-name>test</var-name>
                    <var-value>(*this* > "0.00")</var-value>
                </var>
</field>



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?

Thanks.

_________________________________________________________________
Use your PC to make calls at very low rates 
https://voiceoam.pcs.v2s.live.com/partnerredirect.aspx


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


Mime
View raw message