feat: publish sanitized custom.97 source

This commit is contained in:
cneicy committed 2026-10-27 20:43:39 +08:00
1 parent 8e6ed0317b
commit 86c0276156
1022 files changed
+69903 -19207

No files matched your search

+3 -2
View File
@@ -2,6 +2,7 @@ package common
import (
"crypto/rand"
"errors"
"fmt"
"os"
"strconv"
@@ -130,12 +131,12 @@ func ValidateNumericCode(code string) (string, error) {
code = strings.ReplaceAll(code, " ", "")
if len(code) != 6 {
return "", fmt.Errorf("验证码必须是6位数字")
return "", errors.New("the verification code must be 6 digits")
}
// 检查是否为纯数字
if _, err := strconv.Atoi(code); err != nil {
return "", fmt.Errorf("验证码只能包含数字")
return "", errors.New("the verification code must contain only digits")
}
return code, nil