-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
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
Are there plans to support generating international phone numbers? #160
Comments
each locale can overwrite default phone number format when impl the you can also use fake-rs/fake/examples/fakers.rs Line 264 in 26cca38
|
Thanks, I saw those formats but they are for local numbers. I was searching for something like https://github.com/faker-ruby/faker/blob/main/doc/default/phone_number.md#fakerphonenumberphone_number_with_country_code |
I second that we need a utility function. I design my API endpoints to always use E164 formats. I would think most folks do this as well. After all, the UI generally takes care of these sorts of cleansing the input data, otherwise you'd need to sync parsing logic between the API and the UI. |
I tacked this a little bit in my free time, and I think this can't be done with a locale, or shouldn't be. You see, the locales are specific to a region. Thus, the numbers are restricted to, say, a country. But E164-formatted numbers are generally international, and can belong to any region. Further more, you can't easily generate them with |
From the code it looks like the crate only supports generating just US local phone numbers. The docs don't tell much about the supported formats BTW.
The text was updated successfully, but these errors were encountered: