Closed cyrilgandon closed 5 years ago
See this example, with a Marrocean phone number, parsed with a France country code:
parsePhoneNumber("+212635607833", "FR");
It returns a valid phone number:
{ country: "MA" countryCallingCode: "212" nationalNumber: "635607833" number: "+212635607833" }
What is the point of the defaultCountry parameter ? I was expected an error, or an invalid phoneNumber.
defaultCountry is for parsing non-international phone numbers
defaultCountry
See this example, with a Marrocean phone number, parsed with a France country code:
It returns a valid phone number:
What is the point of the defaultCountry parameter ? I was expected an error, or an invalid phoneNumber.