You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't find a way to generate a cell_phone number for a specific locale. Most (if not all) of the locales seem to have formats for cell_phone but no API seems to expose it. Are they even supported, if not, why are there a bunch of format files for them? I know phone exists, but I'm interested only in cellphone numbers.
Is this just a case of missing the typescript definitions or what's the issue?
The text was updated successfully, but these errors were encountered:
You are correct, they are old, unsupported and not exposed by the current APIs. While you could try to access the raw definitions this is not recommended as these definitions might be removed.
If you're interested in adding the ability to generate mobile numbers only (in countries where this is possible - e.g. not the US, where mobile and landline numbers look the same), please see discussion at #2883 where you could add your use-case.
In the meantime, you can fairly easily roll your own for a specific locale using other helper functions e.g. for en-GB numbers which start 07 you could use faker.helpers.fromRegExp("07[0-9]{9}")
I can't find a way to generate a
cell_phone
number for a specific locale. Most (if not all) of the locales seem to have formats forcell_phone
but no API seems to expose it. Are they even supported, if not, why are there a bunch of format files for them? I knowphone
exists, but I'm interested only in cellphone numbers.Is this just a case of missing the typescript definitions or what's the issue?
The text was updated successfully, but these errors were encountered: