View Full Version : maskRe to allow number and comma

8 Feb 2011, 8:37 AM
I have tried without success to apply a maskRe to a textfield to allow input of only numbers and and optionally a comma

it should be something simple like /\d+\,?/
but that doesn't let me type a comma
it can allow multiple commas, I dont care

any tips?

8 Feb 2011, 12:13 PM
Try /[\d,]+/

8 Feb 2011, 1:04 PM
Try /[\d,]+/

works perfectly, thanks bro