daddyz / phonelib

Ruby gem for phone validation and formatting using google libphonenumber library data
MIT License
1.08k stars 132 forks source link

Universal International Freephone Number not considered valid #314

Open pedro-trindade opened 2 months ago

pedro-trindade commented 2 months ago

Hello amazing PhoneLib team 👋🏻 Per google's libphonenumber, universal international freephone numbers, such as +80050001001, are considered valid:

Validation Results: Result from isPossibleNumber(): true Result from isValidNumber(): true Phone Number region: 001 Result from getNumberType(): TOLL_FREE

However, using PhoneLib I'm getting these results:

inspect: #<Phonelib::Phone:0x000000010529b318 @original="+80050001001", @extension="", @sanitized="80050001001", @original_s="+80050001001", @data={}, @national_number="80050001001"> valid?: false invalid?: true possible?: false impossible?: true types: [] type: human_types: [] human_type: possible_types: [] countries: [] country: valid_countries: [] valid_country: country_code: national: 80050001001 international: +80050001001 e164: +80050001001 national_number: 80050001001

Would it be possible to add support for these numbers in PhoneLib? Wikipedia info for UIFN

Thank you so much for your incredible work and your support! 🙏🏻