Add maskEmail(), fix Safari bug.

This commit is contained in:
Yang Luo
2021-06-25 21:35:20 +08:00
parent 234a9b9060
commit 2ba44748c2
3 changed files with 33 additions and 7 deletions

View File

@ -22,7 +22,8 @@ import (
var rePhoneCn *regexp.Regexp
func init() {
rePhoneCn, _ = regexp.Compile("^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|191|198|199|(147))\\d{8}$")
// https://learnku.com/articles/31543
rePhoneCn, _ = regexp.Compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$")
}
func IsEmailValid(email string) bool {