Home All Groups Group Topic Archive Search About

Help developing a RegularexpressionValidator for a numeric field

Author
25 May 2005 6:17 PM
amazononthemoon
Help,  I am wanting to use a RegularExpressionValidator on a webform to only
allow a numeric value with 2 decimal points.  I want to make it flexible so
the user can enter commas and numbers. ie 1,000.00 or $1000.00 or 1000.00 or
$1,000.00.  The user should also be able to enter 10,000.00 or 100,000.00 or
10,000,000.00.  If someone has one they use I would like to copy it :)

Thanks in advance for your help

Author
26 May 2005 3:27 PM
Brock Allen
You can use the CompareValidator instead and set Type="Currency" and Operator="DataTypeCheck".

-Brock
DevelopMentor
http://staff.develop.com/ballen



Show quoteHide quote
> Help,  I am wanting to use a RegularExpressionValidator on a webform
> to only allow a numeric value with 2 decimal points.  I want to make
> it flexible so the user can enter commas and numbers. ie 1,000.00 or
> $1000.00 or 1000.00 or $1,000.00.  The user should also be able to
> enter 10,000.00 or 100,000.00 or 10,000,000.00.  If someone has one
> they use I would like to copy it :)
>
> Thanks in advance for your help
>