diff --git a/modules/validation/helpers.go b/modules/validation/helpers.go index af21681d38..827f52bb8a 100644 --- a/modules/validation/helpers.go +++ b/modules/validation/helpers.go @@ -94,7 +94,7 @@ func IsValidExternalTrackerURLFormat(uri string) bool { var ( validUsernamePattern = regexp.MustCompile(`^[\da-zA-Z][-.\w]*$`) - invalidUsernamePattern = regexp.MustCompile(`[-._]{2,}|[-._]$`) + invalidUsernamePattern = regexp.MustCompile(`[-._]{2,}|[-._]$`) // No consecutive or trailing non-alphanumeric chars ) // IsValidUsername checks if username is valid