views:

248

answers:

1

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

A: 

I solved this by using a custom validator and writing the same logic in javascript for browser validation and in .net for validating once the postback is triggered.

DanC