This commit is contained in:
2025-11-27 20:08:02 +08:00
parent a188dd3734
commit 339a21827c
10 changed files with 368 additions and 47 deletions
+9
View File
@@ -4,6 +4,7 @@ import (
"crypto/md5"
"crypto/rand"
"encoding/hex"
"regexp"
"time"
)
@@ -81,3 +82,11 @@ func CheckCookiesAndUpdate(cookie *TabCookie_) bool {
}
//return false
}
// 判断邮箱是否合法
func IsEmailValid(email string) bool {
// 正则表达式(覆盖 99% 常见邮箱格式)
pattern := `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`
regex := regexp.MustCompile(pattern)
return regex.MatchString(email)
}