Closed fxavierho123 closed 2 months ago
input:
console.log("7 digit CN number: +86 1234567, ", matchIsValidTel("+86 1234567", { onlyCountries: ['CN'] }) ); console.log("8 digit CN number: +86 12345678, ", matchIsValidTel("+86 12345678", { onlyCountries: ['CN'] }) ); console.log("9 digit CN number: +86 123456789, ", matchIsValidTel("+86 123456789", { onlyCountries: ['CN'] }) ); console.log("10 digit CN number: +86 1234567890, ", matchIsValidTel("+86 1234567890", { onlyCountries: ['CN'] }) ); console.log("11 digit CN number: +86 12345678901, ", matchIsValidTel("+86 12345678901", { onlyCountries: ['CN'] }) ); console.log("12 digit CN number: +86 123456789012, ", matchIsValidTel("+86 123456789012", { onlyCountries: ['CN'] }) ); console.log("12 digit CN number: +86 131123456789, ", matchIsValidTel("+86 131123456789", { onlyCountries: ['CN'] }) );
output:
expected output: Only 11 digit should return true
true
Helllo !
matchIsValidTel is using https://www.npmjs.com/package/libphonenumber-js under the hood, with the isValidPhoneNumber function. So you should create an issue with this package.
matchIsValidTel
https://www.npmjs.com/package/libphonenumber-js
isValidPhoneNumber
input:
output:![image](https://github.com/viclafouch/mui-tel-input/assets/93583076/cf5979c1-cf6a-4916-99be-3f1c21a03d27)
expected output: Only 11 digit should return
true