Update modules/validation/helpers.go
Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
parent
e957aa1ba5
commit
5ef6c022d6
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue