mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 19:50:55 +00:00
更新16开头手机号的正则测试
This commit is contained in:
parent
241f10b429
commit
fb640f0075
@ -280,6 +280,18 @@ func TestMobile(t *testing.T) {
|
|||||||
if valid.Mobile("8617400008888", "mobile").Ok {
|
if valid.Mobile("8617400008888", "mobile").Ok {
|
||||||
t.Error("\"8617400008888\" is a valid mobile phone number should be false")
|
t.Error("\"8617400008888\" is a valid mobile phone number should be false")
|
||||||
}
|
}
|
||||||
|
if !valid.Mobile("16200008888", "mobile").Ok {
|
||||||
|
t.Error("\"16200008888\" is a valid mobile phone number should be true")
|
||||||
|
}
|
||||||
|
if !valid.Mobile("16500008888", "mobile").Ok {
|
||||||
|
t.Error("\"16500008888\" is a valid mobile phone number should be true")
|
||||||
|
}
|
||||||
|
if !valid.Mobile("16600008888", "mobile").Ok {
|
||||||
|
t.Error("\"16600008888\" is a valid mobile phone number should be true")
|
||||||
|
}
|
||||||
|
if !valid.Mobile("16700008888", "mobile").Ok {
|
||||||
|
t.Error("\"16700008888\" is a valid mobile phone number should be true")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestTel(t *testing.T) {
|
func TestTel(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user