$('#form').find("input[type=text], textarea").on('keydown', function(e){
var allowedKeys = [8, 9, 13, 16, 17, 32, 37, 39, 46, 189];
var key = e.keyCode;
if ($.inArray(key, allowedKeys) > -1 || (key >= 65 && key <= 122)) {
return true;
} else {
alert('Недопустимый символ');
this.value = this.value.slice(0, -1);
}
});