jQuery('input[type="text"]').on('input', function() { var sanitized = jQuery(this).val().replace(/[^a-zA-Z\s]/g, ''); // Allow only letters and spaces jQuery(this).val(sanitized); });
Showing the single result