diff --git a/model/user.go b/model/user.go index ca12bbae38..37ac19af35 100644 --- a/model/user.go +++ b/model/user.go @@ -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") diff --git a/model/user_test.go b/model/user_test.go index a11eaa1e77..27b568f516 100644 --- a/model/user_test.go +++ b/model/user_test.go @@ -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 {