I found the following JQuery function here which prevents a user from entering anything that\'s not a number or a single decimal. The function works well but I\'d like to i
It can also be done with a regular expression:
$('.class').on('input', function () { this.value = this.value.match(/^\d+\.?\d{0,2}/); });
Name the css selector .class to whatever you like and put it on the input.