-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Call fake.zipcode_in_state('AZ'), the return zipcode not valid AZ zip code #2011
Comments
The implementation is in faker/faker/providers/address/en_US/__init__.py Lines 543 to 547 in 250fa19
|
@pengdada00100
|
I think this issue can be closed. The problem is that not all 5 digits are valid ZIP codes, and faker can't create valid ones without checking them from a database/API. However, 85775 is Tucson, AZ and 85901 is Show Low, AZ, so the randomly created 85800 is in the correct range for AZ. |
Call fake.zipcode_in_state('AZ'), the return zipcode not valid AZ zip code
Steps to reproduce
Run code:
`from faker import Faker
if name == "main":
fake = Faker()
f = fake.zipcode_in_state('AZ')
print(f)`
get 85800 which not in AZ state
Expected behavior
The zip code should in AZ
Actual behavior
The zipcode not in AZ
The text was updated successfully, but these errors were encountered: