We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phone numbers in ar_EG is not working as expected, it produces other phone number which is not Egyptian ones.
ar_EG
fakerphp/faker
$faker = Faker\Factory::create('ar_EG'); echo $faker->phoneNumber();
Expected a number starts with 010 or 011 or 012 or 015 followed by 8 digits, like:
010
011
012
015
01024587967
or
01140009150
01270773901
01589713732
Output that does not start with the expected prefix and sometimes include characters that does not exist in the Egyptian phones such as ., ( and )
.
(
)
+1-508-876-5010
+1 (762) 759-1405
954.275.5771
We can create a new file called PhoneNumber in src\Provider\ar_EG that contains the following code
PhoneNumber
src\Provider\ar_EG
<?php namespace Faker\Provider\ar_EG; class PhoneNumber extends \Faker\Provider\PhoneNumber { protected static $formats = [ '010########', '011########', '012########', '015########', ]; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Summary
Phone numbers in
ar_EG
is not working as expected, it produces other phone number which is not Egyptian ones.Versions
fakerphp/faker
Self-enclosed code snippet for reproduction
Expected output
Expected a number starts with
010
or011
or012
or015
followed by 8 digits, like:or
or
or
Actual output
Output that does not start with the expected prefix and sometimes include characters that does not exist in the Egyptian phones such as
.
,(
and)
or
or
Suggested code to fix the issue
We can create a new file called
PhoneNumber
insrc\Provider\ar_EG
that contains the following codeThe text was updated successfully, but these errors were encountered: