Change username validation
This commit is contained in:
parent
146ad6a712
commit
e0f0f66c5f
@ -121,7 +121,7 @@ fn is_valid_user_name(username: &str) -> bool {
|
|||||||
|
|
||||||
for c in username[1..].chars() {
|
for c in username[1..].chars() {
|
||||||
if !(
|
if !(
|
||||||
c.is_ascii_alphabetic() && c.is_ascii_lowercase() ||
|
c.is_alphabetic() && c.to_string() == c.to_lowercase().to_string() ||
|
||||||
c.is_ascii_digit() ||
|
c.is_ascii_digit() ||
|
||||||
"_-.".contains(c)
|
"_-.".contains(c)
|
||||||
) {
|
) {
|
||||||
|
Loading…
Reference in New Issue
Block a user