Reputation: 2623
I'm currently using the following regex expression for currency in my input form fields: my requirement is maximum length of input field is 16 digit and after that decimal (.) then two digit. i try this expression but it not working. something wrong with my expression.
^(\d*\.\d{1,2}|\d+){0,16}$
Valid
//space- if user leave input box as blank
0
0.9
9999
9999.0
9999.00
9999999999999999.00
Invalid
0.00.
99999999999999999.00
999......000
AB999
$99.00
Note:-Alphabet and symbol will not allowed (only . will allow)
Upvotes: 0
Views: 133