feat: i18n

This commit is contained in:
meilin.huang
2024-11-20 22:43:53 +08:00
parent 74ae031853
commit 99a746085b
308 changed files with 8177 additions and 3880 deletions

View File

@@ -10,19 +10,16 @@ func CheckAccountPasswordLever(ps string) bool {
if len(ps) < 8 {
return false
}
num := `[0-9]{1}`
a_z := `[a-zA-Z]{1}`
symbol := `[!@#~$%^&*()+|_.,]{1}`
if b, err := regexp.MatchString(num, ps); !b || err != nil {
return false
}
if b, err := regexp.MatchString(a_z, ps); !b || err != nil {
return false
}
if b, err := regexp.MatchString(symbol, ps); !b || err != nil {
return false
}
return true
// 包含大写字母
charRegex := regexp.MustCompile(`[a-zA-Z]`)
// 包含数字
digitRegex := regexp.MustCompile(`[0-9]`)
// 包含特殊符号
specialCharRegex := regexp.MustCompile(`[!@#$%^&*(),.?":{}|<>]`)
return charRegex.MatchString(ps) &&
digitRegex.MatchString(ps) &&
specialCharRegex.MatchString(ps)
}
// 使用config.yml的aes.key进行密码加密