Skip to content

Commit

Permalink
fixed username regex not allowing underscores
Browse files Browse the repository at this point in the history
fixes #159
  • Loading branch information
1zun4 committed Aug 10, 2023
1 parent 90860e3 commit 08f69f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/login/loginmodal/LoginModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
return;
}
let usernameRegex = /^[a-zA-Z0-9]+$/;
let usernameRegex = /^[a-zA-Z0-9_]+$/;
if (!usernameRegex.test(offlineUsername)) {
alert("Username can only contain letters and numbers.");
alert("Username can only contain letters, numbers, and underscores.");
return;
}
Expand Down

0 comments on commit 08f69f0

Please sign in to comment.