From 4b479c5ec159a34cf27430f9f326879a4f7476e2 Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Mon, 9 Oct 2023 15:07:32 +0800 Subject: [PATCH] small fix --- i18n-tool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n-tool.js b/i18n-tool.js index 7de7acc..91025c4 100644 --- a/i18n-tool.js +++ b/i18n-tool.js @@ -2,7 +2,7 @@ module.exports = { validate_phone ({ phone, format } = {}) { try { if (typeof format === 'string') { - return new RegExp(format).test(callnumber) + return new RegExp(format).test(phone) } } catch (exp) { console.log('Invalid phone format: ', format)