Regex for Currency with specific length in javascript -
i'm using following regex expression currency in input form fields: requirement maximum length of input field 16 digit , after decimal (.) 2 digit. try expression not working. wrong expression.
^(\d*\.\d{1,2}|\d+){0,16}$
valid
//space- if user leave input box blank 0 0.9 9999 9999.0 9999.00 9999999999999999.00
invalid
0.00. 99999999999999999.00 999......000 ab999 $99.00
note:-alphabet , symbol not allowed (only . allow)
Comments
Post a Comment