small fix

This commit is contained in:
陆柯 2023-10-09 15:07:32 +08:00
parent ff1875604d
commit 4b479c5ec1

View File

@ -2,7 +2,7 @@ module.exports = {
validate_phone ({ phone, format } = {}) { validate_phone ({ phone, format } = {}) {
try { try {
if (typeof format === 'string') { if (typeof format === 'string') {
return new RegExp(format).test(callnumber) return new RegExp(format).test(phone)
} }
} catch (exp) { } catch (exp) {
console.log('Invalid phone format: ', format) console.log('Invalid phone format: ', format)