Closed RwSgxx closed 2 years ago
Hello, the format is a phone number with an extension.
If you don't want phone numbers with an extension, use the .PhoneNumberFormat(_)
method with the appropriate format you'd like. Eg. Index 1 is this format:
var f = new Faker();
f.Phone.PhoneNumberFormat(1)
.Dump();
(250) 824-1596
Or specify your own:
f.Phone.PhoneNumber("###.!##.####").Dump();
865.390.9546
Thanks, Brian
Version Information
What locale are you using with Bogus?
default
What is the expected behavior?
Generate normal phone numbers that are also parsable by google phone lib.
What is the actual behavior?
It generates phone numbers like: "1-707-975-3864 x110". I've never seen a number like that, and is not parsable by google phone lib.
Please provide a stack trace.
Any possible solutions?
How do you reproduce the issue?
Everything default Ask for a phone number.
Do you have a unit test that can demonstrate the bug?
no
Can you identify the location in Bogus' source code where the problem exists?
no
If the bug is confirmed, would you be willing to submit a PR?
no
Yes or No?