Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub fn is_valid_id(id: &str) -> bool {
}

pub fn is_valid_username(name: &str) -> bool {
name.chars().all(|c| c.is_alphanumeric() || c == '-' || c == '_') && name.len() <= 64 && name.len() >= 3
name.chars().all(|c| c.is_alphanumeric() || c == '-' || c == '_') && name.len() <= 64 && name.len() >= 2
}

pub fn can_view_project(project: &Project, user: Option<&User>) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/settings/users/dialogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const CreateUser = () => {
Username <small>(cannot be changed later)</small>
<input
required
pattern="^[A-Za-z0-9_\-]{1,20}$"
pattern="^[A-Za-z0-9_\-]{2,20}$"
name="username"
type="text"
placeholder="MyUsername"
Expand Down
Loading