I need to validate an input filter on a form because I cannot format the output due to the template I am using. This is a price field and I need the output to be uniform. I am able to use a regular expression to validate the input.
I would like regex to be a whole number with thousands separated with a comma. No decimal. No $.
Valid:
* 0 (just zero)
* 100
* 1,000
* 10,000
Not Valid:
- 01 (leading zero)
- 100.50
- 1000
- $10,000
- -10,000 (no negative number)
Does anyone know how to do this? I cannot find this and thought it should be a common regex.