Skip to content

Commit d7a8b7f

Browse files
removed check of 1st character
1 parent 180266e commit d7a8b7f

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/validator.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,6 @@ pub fn user_role_name(name: &str) -> Result<(), UsernameValidationError> {
102102

103103
let chars: Vec<char> = name.chars().collect();
104104

105-
// Check first character (must be alphanumeric)
106-
if let Some(first_char) = chars.first()
107-
&& !first_char.is_ascii_alphanumeric()
108-
{
109-
return Err(UsernameValidationError::InvalidStartChar);
110-
}
111-
112105
// Check last character (must be alphanumeric)
113106
if let Some(last_char) = chars.last()
114107
&& !last_char.is_ascii_alphanumeric()

0 commit comments

Comments
 (0)