forked from rDrama/rDrama
1
0
Fork 0

re-add special character check

master
justcool393 2022-10-29 21:57:47 -05:00 committed by GitHub
parent 7e1681e34e
commit 617d237adc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ document.getElementById('username-register').addEventListener('input', function
const userName = document.getElementById("username-register").value;
const id = document.getElementById("usernameHelpRegister");
if (/[^a-zA-Z0-9_\-$]/.test(userName) && false) {
if (/[^a-zA-Z0-9_\-$]/.test(userName)) {
id.innerHTML = '<span class="form-text font-weight-bold text-danger mt-1">No special characters or spaces allowed.</span>';
} else {
id.innerHTML = '<span class="form-text font-weight-bold text-success mt-1">Username is a-okay!</span>';