Click here to Skip to main content
15,918,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to add validation expression for expression validator
which allow every decimal numbers and non decimal numbers ?

Eg: 1234,656.78888,6.0, etc.
Posted
Updated 30-Dec-10 19:18pm
v3

 
Share this answer
 
Use ^[+-]?(?:\d+\.?\d*|\d*\.?\d+)[\r\n]*$ regex for validating decimal expression.

And to know about how to apply it on any of asp.net control , Refer HERE[^]
 
Share this answer
 
Comments
TweakBird 31-Dec-10 1:43am    
Good call.
Md.Hassan-ul-jahid 26-Aug-12 0:50am    
Its a very good solution for validating decimal number.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900