diff --git a/src/framework/utils/regular/regular.go b/src/framework/utils/regular/regular.go index 3eeb31c6..c27cb08e 100644 --- a/src/framework/utils/regular/regular.go +++ b/src/framework/utils/regular/regular.go @@ -34,9 +34,11 @@ func ValidPassword(password string) bool { if password == "" { return false } - pattern := `^(?![A-Za-z0-9]+$)(?![a-z0-9\W]+$)(?![A-Za-z\W]+$)(?![A-Z0-9\W]+$)[a-zA-Z0-9\W]{6,}$` - re := regexp2.MustCompile(pattern, 0) - match, err := re.MatchString(password) + // pattern := `^(?![A-Za-z0-9]+$)(?![a-z0-9\W]+$)(?![A-Za-z\W]+$)(?![A-Z0-9\W]+$)[a-zA-Z0-9\W]{6,}$` + // re := regexp2.MustCompile(pattern, 0) + // match, err := re.MatchString(password) + pattern := `^.{5,}$` + match, err := regexp.MatchString(pattern, password) if err != nil { return false }