Closed percivalalb closed 1 year ago
Thanks, I'll take a look.
The most recent release was built using OFCOM data that says numbers in that range are one digit longer than they actually are:
I've put in an egregious hack (0d6430db) for now so it will accept both 9 and 10 digit numbers for that range. That will be in the next release. I'll also contact OFCOM and get them to fix their data up-stream.
Incidentally, the reason libphonenumber accepts it is that they've applied that evil hack to the whole of the 0800 number range. From resources/PhoneNumberMetadata.xml
:
<nationalNumberPattern>
80[08]\d{7}|
800\d{6}|
8001111
</nationalNumberPattern>
Thanks for investigating and the insights into phonenumberlib
This is a Barclays freephone number and the number is valid on https://libphonenumber.appspot.com/phonenumberparser?number=%2B44800716598 but
Number::Phone
is unable to parse it. I have not looked into the reason why, just there is some discrepancy here. Writing it down here so it is saved.