struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fea jabi" <zy...@hotmail.com>
Subject validate integer with a comma thousands seperator using Validator
Date Wed, 02 Aug 2006 14:09:19 GMT
Using struts validator.

have to validate the user entered value.

The value entered should be a positive integer with a comma thousands 
seperator. the number need not be in thousands.

I have as below to check for positive integer without comma seperator. but 
not sure how to validate if the user entered value with a comma seperator?

i.e value like 25,349 // how to validate this?

<field property="hrs" depends="integer,validwhen">
                <msg name="integer" key="errors.notvalid"/>
                <msg name="validwhen" key="errors.notvalid"/>
                <var>
                    <var-name>test</var-name>
                    <var-value>(*this* >= 0)</var-value>
                </var>
            </field>

how to validate the user entered value with a comma seperator? Thanks.

_________________________________________________________________
Donít just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


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


Mime
View raw message