Regular Expression for decimal numbers (at max 3 decimal numbers with comma)
how can I write a regular expression that validates an input textbox that
should contain only decimal values that can have at max 3 decimals, but
also none, and a comma as separated characted. For example, these values
are valid:
1,234
1,23
1,2
1
These are not valid:
1,2345 (too many decimal numbers)
A (a letter is not a number)
(a space or string empty)
1.234 (used a dot instead of a comma)
Thank for every help.
Luis
No comments:
Post a Comment