From 8c0dab0b7bf8be5b21985ef267ca995df878360f Mon Sep 17 00:00:00 2001 From: NauxLiu Date: Sun, 20 Dec 2015 23:46:13 +0800 Subject: [PATCH] improve regexp zh-CN --- validator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validator.js b/validator.js index 2e3b2ed08..63a58fadd 100644 --- a/validator.js +++ b/validator.js @@ -83,7 +83,7 @@ var base64 = /^(?:[A-Z0-9+\/]{4})*(?:[A-Z0-9+\/]{2}==|[A-Z0-9+\/]{3}=|[A-Z0-9+\/]{4})$/i; var phones = { - 'zh-CN': /^(\+?0?86\-?)?1[345789]\d{9}$/, + 'zh-CN': /^(\+?0?86\-?)?((13\d|14[57]|15[^4,\D]|17[678]|18\d)\d{8}|170[059]\d{7})$/, 'zh-TW': /^(\+?886\-?|0)?9\d{8}$/, 'en-ZA': /^(\+?27|0)\d{9}$/, 'en-AU': /^(\+?61|0)4\d{8}$/,