//only letters and numbers (no korean, no special chars) $('.username').on('keyup', function(e){ let val = $(this).val() val = val.replace(/[^a-zA-Z0-9]/ig, '') this.value = val })