Documentation ¶
Index ¶
- Constants
- func CheckPasswordLever(ps string) error
- func Passport(passport string) bool
- func PassportNumber(passportNumber string) bool
- func RegAmount(amount string) bool
- func RegEmail(email string) bool
- func RegIDCard(idCard string) bool
- func RegIPV4(ipv4 string) bool
- func RegIPV6(ipv6 string) bool
- func RegLandLineNumber(lindLineNumber string) bool
- func RegMAC(mac string) bool
- func RegMatchPhone(phone string) bool
- func RegSocialCreditCode(socialCreditCode string) bool
- func RegUrl(url string) bool
- func RegUrlPort(urlPort string) bool
Constants ¶
View Source
const ( PHONE = `[1](([3][0-9])|([4][5-9])|([5][0-3,5-9])|([6][5,6])|([7][0-8])|([8][0-9])|([9][1,8,9]))[0-9]{8}` LINDLINENUMBER = `\b(0\d{2,3}-\d{7,8}|\(?0\d{2,3}[)-]?\d{7,8}|\(?0\d{2,3}[)-]*\d{7,8})\b` RECORDNO = `[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]` PASSPORTNUMBER = `([a-zA-z]|[0-9]){5,17}` PASSPORT = `[HMhm]{1}([0-9]{10}|[0-9]{8})` IPV4 = `(((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(.|$)){4})` IPV6 = `` /* 211-byte string literal not displayed */ MAC = `(?:(?:(?:[a-f0-9A-F]{2}:){5})|(?:(?:[a-f0-9A-F]{2}-){5}))[a-f0-9A-F]{2}` EMAIL = `([\w.\_]{2,10})@(\w{1,}).([a-z]{2,4})` SOCIALCREDITCODE = `[\dANY]{1}\d{7}[0-9A-HJ-NPQRTUWXY]{10}` URL = `^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?` URLPORT = `^((ht|f)tps?:\/\/)?[\w-]+(\.[\w-]+)+:\d{1,5}\/?$` AMOUNT = `(?:^[1-9]([0-9]+)?(?:\.[0-9]{1,2})?$)|(?:^(?:0)$)|(?:^[0-9]\.[0-9](?:[0-9])?$)` )
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordLever ¶
CheckPasswordLever 密码常用正则表达式 密码强度必须为字⺟⼤⼩写+数字+符号,9位以上
func RegLandLineNumber ¶
RegLandLineNumber 座机号 判定数据内容是否包含中国固定电话号码
func RegSocialCreditCode ¶
RegSocialCreditCode 统一社会信用代码
func RegUrlPort ¶
RegUrlPort 网址URL(带端口号,如:https://www.baidu.com:8080/)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.