diff --git a/api/v1/auth.go b/api/v1/auth.go index f27b36cc..52102605 100644 --- a/api/v1/auth.go +++ b/api/v1/auth.go @@ -22,7 +22,7 @@ import ( ) var ( - usernameMatcher = regexp.MustCompile("^[a-z]([a-z0-9-]{1,30}[a-z0-9])?$") + usernameMatcher = regexp.MustCompile("^[a-z0-9]([a-z0-9-]{1,30}[a-z0-9])$") ) type SignIn struct { diff --git a/api/v2/user_service.go b/api/v2/user_service.go index 1e65af5b..72aedc42 100644 --- a/api/v2/user_service.go +++ b/api/v2/user_service.go @@ -23,7 +23,7 @@ import ( ) var ( - usernameMatcher = regexp.MustCompile("^[a-z]([a-z0-9-]{1,30}[a-z0-9])?$") + usernameMatcher = regexp.MustCompile("^[a-z0-9]([a-z0-9-]{1,30}[a-z0-9])$") ) type UserService struct {