You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by fea jabi <zy...@hotmail.com> on 2006/08/02 16:09:19 UTC

validate integer with a comma thousands seperator using Validator

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