diff --git a/api/v1/auth.go b/api/v1/auth.go index 030903a8..f27b36cc 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-]{2,30}[a-z0-9])?$") + usernameMatcher = regexp.MustCompile("^[a-z]([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 7505c826..474af033 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-]{2,30}[a-z0-9])?$") + usernameMatcher = regexp.MustCompile("^[a-z]([a-z0-9-]{1,30}[a-z0-9])?$") ) type UserService struct {