I'm working on a form where my user enters a number between 0-100. If my user puts in 101, it will return with an alert saying that the numbers are invalid. But how do I validate so he doesn't put in something like "asdfasdf" or if it's just empty?
This is my Validate Script:
function validate() {
var pct = $('#pct').val();
if (pct !== "" && (pct > 100 || pct < 0))
return false;
else
return true;
}