I need to validate a textbox input and can only allow decimal inputs like: X,XXX (only one digit before decimal sign and a precision of 3).
textbox
X,XXX
I'm using C# and try this ^[0-9]+(.[0-9]{1,2})?$?
^[0-9]+(.[0-9]{1,2})?$
^[0-9]([.,][0-9]{1,3})?$
It allows:
0 1 1.2 1.02 1.003 1.030 1,2 1,23 1,234
BUT NOT:
.1 ,1 12.1 12,1 1. 1, 1.2345 1,2345
1.4m articles
1.4m replys
5 comments
57.0k users