Skip to content

Commit caae6de

Browse files
committed
feat: Allow dashes in username (fixes #526)
1 parent e8dacf9 commit caae6de

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/renderer/views/SetupUI.vue‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,9 +1003,9 @@ const usernameErrors = computed(() => {
10031003
errors.push("Must be at least 2 characters long");
10041004
}
10051005
1006-
// Only alphanumeric characters are allowed
1007-
if (!/^[a-zA-Z0-9]+$/.test(username.value)) {
1008-
errors.push("Must only contain alphanumeric characters");
1006+
// Only ASCII letters, numbers, and dashes are allowed
1007+
if (!/^[a-zA-Z0-9-]+$/.test(username.value)) {
1008+
errors.push("Must only contain ASCII letters, numbers, and dashes");
10091009
}
10101010
10111011
return errors;

0 commit comments

Comments
 (0)