开发者

Regex and jQuery, validate input field

开发者 https://www.devze.com 2023-02-11 21:14 出处:网络
I have an开发者_Python百科 input field that only can be number and 2 decimals like 23,50. The decimal point have to be an comma , .It has to be exact to decimals even if thay are zeros. I use ths patt

I have an开发者_Python百科 input field that only can be number and 2 decimals like 23,50. The decimal point have to be an comma , .It has to be exact to decimals even if thay are zeros. I use ths pattern in asp and it seems to be ok, but how can I use it in jquery?

^\d{1,9}(\,\d{2})$


See here:

jQuery validate: How to add a rule for regular expression validation?

0

精彩评论

暂无评论...
验证码 换一张
取 消