Reputation: 17530
I want to allow basic characters A-Z, a-z,0-9
, and basic special characters ~``!@#$%^&*()_+-=[]{};'\:"|,./<>?
availalbe on a standard english keyboard to be only typed in a text area.
Looking for help !
Upvotes: 4
Views: 5017
Reputation: 96
Sample:
$('#text_area_id').keyup(function() {
$(this).val($(this).val().replace(/[^A-Za-z0-9~`!@#$%^&*()_+-=\[\]{};'\\:"|,.\/<>?]/g,''))
});
Upvotes: 8