From fb640f00755616438ba49be5a7844e1bc5a10ab4 Mon Sep 17 00:00:00 2001 From: Allen <934932687@qq.com> Date: Tue, 22 Oct 2019 17:07:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B016=E5=BC=80=E5=A4=B4=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7=E7=9A=84=E6=AD=A3=E5=88=99=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- validation/validation_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/validation/validation_test.go b/validation/validation_test.go index 3146766b..bae48d37 100644 --- a/validation/validation_test.go +++ b/validation/validation_test.go @@ -280,6 +280,18 @@ func TestMobile(t *testing.T) { if valid.Mobile("8617400008888", "mobile").Ok { 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) {