Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery plugin for preventing entering any input not matching a regexp

does jquery have any plugin that prevents entering any input to a textbox that doesnt match a regexp pattern. for example , i have a textbox for entering payment amount, i want user t be able to enter only numebers and . in the textbox, all other input wont have any effect on the textbox..

thanks

like image 359
jyotishka bora Avatar asked Jan 08 '09 19:01

jyotishka bora


1 Answers

Masked Input Plugin

jQuery(function($){   
    $("#paymentAmount").mask("9999.99");
});
like image 56
Bob Avatar answered Nov 02 '22 22:11

Bob