Faker icon indicating copy to clipboard operation
Faker copied to clipboard

German phone numbers invalid for libphonenumber

Open neeg opened this issue 4 years ago • 2 comments

Summary

Faker generates german phone numbers like 00879 67680 that are not considered valid: https://libphonenumber.appspot.com/phonenumberparser?number=00879%2067680&country=DE

Versions

Version
PHP 7.3.10
fzaninotto/faker 1.9.1

Self-enclosed code snippet for reproduction

$faker->phoneNumber()

Expected output

German phone numbers never start with 00. Only 0[1-9]xxx are possible

Actual output

00879 67680

neeg avatar Dec 18 '19 08:12 neeg

@localheinz could you verify this?

pimjansen avatar Jan 16 '20 12:01 pimjansen

@pimjansen Here is an official confirmation that leading zeros are not allowed: https://www.bundesnetzagentur.de/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Nummerierung/Rufnummern/ONRufnr/ONL%C3%A4nge_ONRufnr/L%C3%A4nge_ONRufnr_Basepage.html

minthemiddle avatar Apr 19 '20 11:04 minthemiddle