Automattic / node-phone

With a given country and phone number, validate and format the phone number to E.164 standard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix logic for countries that don't have mobile-begin-with

allendav opened this issue · comments

If you call the module with a phone number but not a country, and the phone number includes a country code (e.g. +54 for Argentina) and the country doesn't have any mobile_begin_with values, then the internal function get_iso3166_by_phone will fail to return an iso3166 entry and valid phone numbers for that country will fail to validate.