Click to See Complete Forum and Search --> : CompareValidator fail if currency value more than 2 decimal point


leonteoh
August 25th, 2004, 05:12 AM
Does anyone encounter problem using the compare validator against a textbox with operator=DataTypeCheck, type="Currency" and the textbox value contains more than 2 decimal point?

With type="Double" it works fine with more than 2 decimal point but must not have comma.

Below is my test result:
Currency 10,200.20 pass
Currency 10,200.204 fail
Double 10,200.20 fail
Double 10200.204 pass

Any suggestion to overcome this issue?

Leon

MRutledge
August 25th, 2004, 02:59 PM
What exactly are you trying to validate? Could you use regular expressions to perform your validation?

leonteoh
August 26th, 2004, 12:30 AM
I'm trying to validate a unit price that can have up to 5 decimal point with the format as this ##,##0.00000

MRutledge
August 26th, 2004, 06:22 PM
I would use a regular expression to do this validation.