Commit 82c65294 authored by ale's avatar ale

Allow underscores in usernames

parent 51549bab
Pipeline #4961 failed with stages
in 3 minutes and 51 seconds
......@@ -223,7 +223,7 @@ func matchRegexp(rx *regexp.Regexp, errmsg string) ValidatorFunc {
// The generic username regexp allows for standard usernames.
var usernameRx = regexp.MustCompile(`^([a-z0-9]+[.-]?)+[a-z0-9]$`)
var usernameRx = regexp.MustCompile(`^([a-z0-9]+[-_.]?)+[a-z0-9]$`)
func matchUsernameRx() ValidatorFunc {
return matchRegexp(usernameRx, "value must be an alphanumeric sequence, including . and - characters but not starting or ending with those")
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment