Change username validation

This commit is contained in:
Elias Schriefer 2021-10-25 20:00:20 +02:00
parent 146ad6a712
commit e0f0f66c5f

View File

@ -121,7 +121,7 @@ fn is_valid_user_name(username: &str) -> bool {
for c in username[1..].chars() {
if !(
c.is_ascii_alphabetic() && c.is_ascii_lowercase() ||
c.is_alphabetic() && c.to_string() == c.to_lowercase().to_string() ||
c.is_ascii_digit() ||
"_-.".contains(c)
) {