mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-24 10:07:21 +02:00
enable dot(.) in usernames
This commit is contained in:
parent
8125f97c21
commit
3529dda2ba
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
// validate a username (e.g. from github)
|
||||
var reUsername = regexp.MustCompile("^[a-zA-Z0-9-_]+$")
|
||||
var reUsername = regexp.MustCompile("^[a-zA-Z0-9-_.]+$")
|
||||
|
||||
var errUserLoginInvalid = errors.New("Invalid User Login")
|
||||
|
||||
|
@ -35,6 +35,10 @@ func TestUserValidate(t *testing.T) {
|
||||
user: User{Login: "john_smith"},
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
user: User{Login: "john.smith"},
|
||||
err: nil,
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
Loading…
Reference in New Issue
Block a user