email limit & password limit
This commit is contained in:
@@ -118,7 +118,7 @@ func ValidateEmail(email string) bool {
|
||||
// ValidatePassword checks if the provided password is strong enough.
|
||||
// In this example, we just check if the password length is 8 or more.
|
||||
func ValidatePassword(password string) bool {
|
||||
const minPasswordLength = 8
|
||||
const minPasswordLength = 30
|
||||
return len(password) >= minPasswordLength
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ var (
|
||||
CodeEmailExistsErr = &StatusResponse{5053, "email exists"} // email存在
|
||||
CodeEmailTimeShortErr = &StatusResponse{5053, "email with the time of resend is too short"} // email重发的时间太短
|
||||
CodeResetPasswordErr = &StatusResponse{5054, "reset password error"} // 无效密码
|
||||
CodeEmailErr = &StatusResponse{5054, "email error"}
|
||||
|
||||
CodeSafeValueRangeErr = &StatusResponse{5040, "value not in range"} // 值不在范围内
|
||||
CodeTemplateErr = &StatusResponse{5040, "template parsed error"} // 模板解析错误
|
||||
|
||||
Reference in New Issue
Block a user