prevent from pressing digits without alphabets and spaces
HTML
<input name="username" id="username" type="text" onCopy="return false"
onDrag="return false" onDrop="return false" onPaste="return false"
autocomplete=off />
JavaScript
$(document).ready(function() {
$("#username").keypress(function(event) {
var inputValue = event.which;
if(!((inputValue >= 65 && inputValue <= 90) || // A-Z
(inputValue >= 97 && inputValue <= 122) || // a-z
(inputValue == 32))) { // space
event.preventDefault();
}
});
});