asp.net compare validators to allow comma and dot (both!) as decimal separator
- by DanC
I am using a compare validator, which validates that the entered number is a valid double and also validates it against a given value (greater than zero). I am validating money amounts. Because of the location where the app is used, the locale sets the comma as the decimal separator. The problem is that when a user enters the value using the numeric keyboard, the number gets written with the dot as decimal separator, and is rejected by the validation.
I'd like to have this validation done before triggering a postback (like a customvalidator would) and accepting both separators.
Any ideas?
Thanks