Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

$buildingNumber can be 0, 00, 000 #706

Closed
xfxf opened this issue Sep 18, 2015 · 3 comments
Closed

$buildingNumber can be 0, 00, 000 #706

xfxf opened this issue Sep 18, 2015 · 3 comments

Comments

@xfxf
Copy link
Contributor

xfxf commented Sep 18, 2015

Hi there, $buildingNumber can actually produce numbers like 0, 00, 000. Is this actually valid anywhere in the world?

Happy to provide a patch, just verifying if this is intentional behaviour first.

@fzaninotto
Copy link
Owner

Nope, you're right, it'a a bug.

@okj579
Copy link
Contributor

okj579 commented Sep 18, 2015

According to Wikipedia, house numbers sometimes start at 0, with at least one example in the UK. Faker probably doesn't need to generate them though.
https://en.wikipedia.org/wiki/House_numbering

@vlakoff
Copy link
Contributor

vlakoff commented Sep 29, 2015

Replacing e.g. ### with %## in $buildingNumber property of Provider/Address, Provider/en_US/Address, etc. should do the job.

Note that Provider/fr_FR/Address is already correct (it even has RNG weighting!). I haven't checked the rest.

fzaninotto added a commit that referenced this issue Oct 12, 2015
Force first digit in building number to be non-zero. Fixes #706
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants