ASP.Net validation
1 answer
My usual method is to use RegexValidator with a validation expression ^(\d+(\.\d*)?)|(\d*(\.\d+))$
. You can change this to include "." or "": ^(\d+([\.,]\d*)?)|(\d*([\.,]\d+))$
.
If you want to be strictly correct, you must include the correct validation expression for each culture.
Also note that you still need the RequiredFieldValidator if this value is required.
+1
source to share