chore: update username regexp

This commit is contained in:
Steven
2023-10-14 13:42:27 +08:00
parent cfc5599334
commit c58820fa64
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ import (
) )
var ( 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 { type SignIn struct {

View File

@ -23,7 +23,7 @@ import (
) )
var ( 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 { type UserService struct {