Use the following in an event handler for the input's keyup event.
function hasNonStandard(inputElem) {
return /[^\w]/.test(inputElem.value);
}
If the above code returns true, that means a non digit or word character has been entered into the input. You can lookup regular expressions to better define what you want. \w also includes underscores so you may not want that.