Created
July 1, 2019 05:50
-
-
Save valentincognito/c7b474ca6bdff076b1f1d5ac6316eba8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment