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
The Canadian area code 226 is erroneously included in the array of US area codes in lib/locales/en-US.yml (see line 92). This can be problematic when using Faker to generate US-specific phone numbers (withFaker::Config.locale = 'en-US') which are then validated using other tools (such as the telephone_number gem).
With the existing array of area codes in the en-US locale, extremely occasionally, Faker will generate a logically invalid US phone number (e.g. +12262011212).
To Reproduce
Since this is a locale-specific issue, reproducing it directly is somewhat difficult. Using a phone number string like +12262011212, which would be generated by Faker (withFaker::Config.locale = 'en-US'), you may observe that the phone number is determined to be invalid:
Please let me know if there are more direct ways of generating a phone number with the specific, invalid (in the context of the en-US locale, that is) area code.
Expected behavior
The Canadian area code 226 should not be included in the array of US area codes.
The text was updated successfully, but these errors were encountered:
Describe the bug
The Canadian area code 226 is erroneously included in the array of US area codes in
lib/locales/en-US.yml
(see line 92). This can be problematic when using Faker to generate US-specific phone numbers (withFaker::Config.locale = 'en-US'
) which are then validated using other tools (such as the telephone_number gem).With the existing array of area codes in the
en-US
locale, extremely occasionally, Faker will generate a logically invalid US phone number (e.g.+12262011212
).To Reproduce
Since this is a locale-specific issue, reproducing it directly is somewhat difficult. Using a phone number string like
+12262011212
, which would be generated by Faker (withFaker::Config.locale = 'en-US'
), you may observe that the phone number is determined to be invalid:Please let me know if there are more direct ways of generating a phone number with the specific, invalid (in the context of the
en-US
locale, that is) area code.Expected behavior
The Canadian area code 226 should not be included in the array of US area codes.
The text was updated successfully, but these errors were encountered: