This commit is contained in:
luk.lu
2023-01-31 16:41:23 +08:00
parent 7cd7c2a599
commit 04f2361dc2
9 changed files with 1059 additions and 879 deletions

View File

@@ -1,4 +1,8 @@
module.exports = {
CN: /^1\d{10}$/,
SG: /^[89]\d{7}$/,
US: /^\d{10}$/,
JP: /^\d{10}$/,
validatePhone ({ phone } = {}) {
try {
let [fullphone, areacode, callnumber] = /^\+(\d{1,3})-(\d{7,11})$/.exec(phone)