-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added the documentation. * Implemented the PhoneNumberFaker. * Added the PhoneNumberFaker to the main faker classes.
- Loading branch information
Showing
9 changed files
with
1,067 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Faker.PhoneNumber | ||
|
||
Phone numbers may be in any of the following formats: | ||
|
||
* 333-333-3333 | ||
* (333) 333-3333 | ||
* 1-333-333-3333 | ||
* 333.333.3333 | ||
* 333-333-3333 | ||
* 333-333-3333 x3333 | ||
* (333) 333-3333 x3333 | ||
* 1-333-333-3333 x3333 | ||
* 333.333.3333 x3333 | ||
|
||
(Don't let the example output below fool you - any format can be returned at random.) | ||
|
||
```cs | ||
Faker.PhoneNumber.PhoneNumber() //=> "397.693.1309" | ||
Faker.PhoneNumber.CellPhone() //=> "(186)285-7925" | ||
// NOTE NOTE NOTE NOTE | ||
// For the 'US only' methods below, first you must do the following: | ||
Faker.Config.locale = 'en-US' | ||
// or for Canada | ||
Faker.Config.locale = 'en-CA' | ||
|
||
// US only | ||
Faker.PhoneNumber.AreaCode() //=> "201" | ||
// US only | ||
Faker.PhoneNumber.ExchangeCode() //=> "208" | ||
// Optional parameter: length=4 | ||
Faker.PhoneNumber.SubscriberNumber() //=> "3873" | ||
Faker.PhoneNumber.SubscriberNumber(2) //=> "39" | ||
Faker.PhoneNumber.Extension() //=> "3764" | ||
Faker.PhoneNumber.Extension(2) //=> "36" | ||
``` |
Oops, something went wrong.