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)