Skip to content

Commit

Permalink
ease username restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
mehm8128 committed May 6, 2023
1 parent 9e36875 commit 4679102
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/validation/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func IsValidExternalTrackerURLFormat(uri string) bool {

var (
validUsernamePattern = regexp.MustCompile(`^[\da-zA-Z][-.\w]*$`)
invalidUsernamePattern = regexp.MustCompile(`[-._]{2,}|[-._]$`) // No consecutive or trailing non-alphanumeric chars
invalidUsernamePattern = regexp.MustCompile(`[.]{2,}|[-._]$`) // No consecutive or trailing non-alphanumeric chars
)

// IsValidUsername checks if username is valid
Expand Down

0 comments on commit 4679102

Please sign in to comment.