-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
docs: update with notes about validity for zips #2963
docs: update with notes about validity for zips #2963
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @garrettgregor ! Left two small suggestions.
doc/default/address.md
Outdated
#note: #zip_code will return a random string in zipcode format; may or may not be a valid US zip | ||
Faker::Address.zip_code #=> "58517" or "23285-4905" | ||
|
||
#note: #zip will return a random string in zipcode format; may or may not be a valid US zip | ||
Faker::Address.zip #=> "58517" or "66259-8212" | ||
|
||
#note: #postcode will return a random string in postcode format; may or may not be a valid US zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We generate zip codes for other countries, too.
#note: #zip_code will return a random string in zipcode format; may or may not be a valid US zip | |
Faker::Address.zip_code #=> "58517" or "23285-4905" | |
#note: #zip will return a random string in zipcode format; may or may not be a valid US zip | |
Faker::Address.zip #=> "58517" or "66259-8212" | |
#note: #postcode will return a random string in postcode format; may or may not be a valid US zip | |
#note: #zip_code will return a random string in zipcode format; may or may not be a valid zip | |
Faker::Address.zip_code #=> "58517" or "23285-4905" | |
#note: #zip will return a random string in zipcode format; may or may not be a valid zip | |
Faker::Address.zip #=> "58517" or "66259-8212" | |
#note: #postcode will return a random string in postcode format; may or may not be a valid zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this accept something other than a US state? Will it adjust this per locale? If so maybe it would also be good to specify that this may or may not be a valid zip for the locale?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will adjust per locale, yes. Saying that it may not be valid for the locale sounds good to me, thanks!
Updated with latest main and verbiage about locale instead of US zips. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Motivation / Background
This Pull Request has been created because of issues I had run into whil previously trying to generate zip/postcode data. This came from a suggestion by @stefannibrasil ππ»ββοΈ .
Additional information
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
If you're proposing a new generator or locale: