I need to create a validator.
The validator needs to reject only two characters which is only " , and accept rest of them.
Here is my present code
<input type="text"/>
$(document).ready(function () {
$('input').keyup(function() {
var $th = $(this);
$th.val( $th.val().replace(/[^a-zA-Z0-9]/g, function(str) { alert('You typed " ' + str + ' ".\n\nPlease except.'); return ''; } ) );
});
});
http://jsfiddle.net/ntywf/325/