mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
fix(package): [validator] match whole Chinese phone numbers (#396)
This commit is contained in:
1 parent
70b8fc764e
commit
6ff2966d50
2 files changed
+4
-1
No files matched your search
@@ -554,6 +554,9 @@ func TestIsChinesePhone(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
assert := internal.NewAssert(t, "TestIsChinesePhone")
|
||||
for _, phone := range []string{"x010-32116675", "0464-8756213x", "0731-822515456", "010-32116675\n"} {
|
||||
assert.Equal(false, IsChinesePhone(phone))
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
input string
|
||||
|
||||
Reference in new issue
Block a user