Closed henser closed 5 years ago
The reason is that the number you're formatting is a "short code" which aren't formatted by this library.
See the "Differences" section: https://github.com/catamphetamine/libphonenumber-js#difference-from-googles-libphonenumber
<!-- Premium rate SMS (6 digit) -->
<numberFormat pattern="(\d{3})(\d{3})">
<leadingDigits>19</leadingDigits>
<format>$1 $2</format>
<intlFormat>NA</intlFormat>
</numberFormat>
AsYouType doesn't seem to be formatting Australian "6-digit variable cost fixed line (toll free, premium rate, shared cost)" with leading '13' phone numbers properly. These are being identified as SHARED_COST and are correctly described in the metadata xml and as far as I know they were working properly before.
This is the xml descriptor:
And here's an example in action showing format 13xxxx instead of expected 13 xx xx.