parsePhone
function parsePhone(input, defaultCountry?): ParsedPhone;Interpret raw input.
Three shapes are accepted, because users paste all three:
+44 20 7123 4567— explicit international, the country comes from the calling code anddefaultCountryis ignored0044 20 …— the00international prefix, treated identically020 7123 4567— national, interpreted againstdefaultCountry
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input | string |
defaultCountry? | string |