xxx
This commit is contained in:
parent
f8a8d9459b
commit
407f71d208
|
@ -15,8 +15,6 @@ func (o AccountType) AccountType(account string) AccountType {
|
||||||
return AccountTypeDefault
|
return AccountTypeDefault
|
||||||
} else if helper.IsPhoneNumber(account) {
|
} else if helper.IsPhoneNumber(account) {
|
||||||
return AccountTypePhone
|
return AccountTypePhone
|
||||||
} else if helper.IsValidQQ(account) {
|
|
||||||
return AccountTypeQQ
|
|
||||||
}
|
}
|
||||||
return AccountTypeDefault
|
return AccountTypeDefault
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,10 +30,3 @@ func IsEmail(email string) bool {
|
||||||
var emailRegex = regexp.MustCompile(`[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`)
|
var emailRegex = regexp.MustCompile(`[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`)
|
||||||
return emailRegex.MatchString(email)
|
return emailRegex.MatchString(email)
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsValidQQ 检查给定的字符串是否为有效的 QQ 号
|
|
||||||
func IsValidQQ(qq string) bool {
|
|
||||||
// QQ号正则表达式:5到11位数字,且开头不为0的情况
|
|
||||||
re := regexp.MustCompile(`^(?!0)[0-9]{5,11}$`)
|
|
||||||
return re.MatchString(qq)
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue