I have a textbox for entering a currency amount, with a RangeValidator control making sure the value entered is between 1 and 99999999.99.
The field also has an “onblur” event that fires off some JavaScript to format the input with commas and a decimal point (e.g. 12455 -> 12,455.00). There's also a "onfocus" event that reverses the "onblur" effect, putting the value back into an editable format (e.g. 12,455.00 -> 12455.00.
My problem is the RangeValidator doesn't like the formatted value with the commas and subsequently fails on the validation.
Is there a way to get around that? I want to be able to range check the value, yet still present it formatted when the textbox doesn't have focus. I realize that a CustomValidator could probably work, but I was hoping to get this to work with the RangeValidator.