natintosh / plugin_libphonenumber

MIT License
5 stars 40 forks source link

Correct phone numbers are considered invalid #9

Closed rabraghib closed 1 year ago

rabraghib commented 1 year ago

All Moroccan numbers that start with something other than 6 after +212 are considered invalid meanwhile they are valid

await PhoneNumberUtil.isValidPhoneNumber("600000000", "MA"); // true

await PhoneNumberUtil.isValidPhoneNumber("500000000", "MA"); // false
await PhoneNumberUtil.isValidPhoneNumber("700000000", "MA"); // false
await PhoneNumberUtil.isValidPhoneNumber("+212700000000", "MA"); // false
await PhoneNumberUtil.isValidPhoneNumber("0700000000", "MA"); // false
anassrakibi commented 1 year ago

I confirm to have the same issue