bchavez / bchavez/Bogus

Invalid Zip Codes (US)

Open
#481 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C#
Stars
9.7k
Forks
538
PR merge metrics
No merged PRs in 30d

Description

### Version Information
| Software | Version(s) |
| ------------------------| ---------- |
| Bogus NuGet Package | 34.0.2 |
| Visual Studio | 2022 17.6.3 |
| Language | C# |

### What locale are you using with Bogus?
en_US

### What's the problem?
I am getting a lot of invalid zip codes generated by Bogus. I have my locale set to en_US. I am wanting a 5 digit zip so I have "f.Address.ZipCode("#####")" but I have also tried it without any args or even with #####-#### but am still getting a lot of invalid zip codes. The zip codes seem to just be random numbers. As an example, the last zip generated was 95266 which is not a valid US zip code. I have verified the zip codes with the USPS to be sure.

Contributor guide

Open the contributing guide

Research direction

Use the en_US locale and f.Address.ZipCode("#####") as the reproduction entry point, and compare generated values with USPS validation, including the reported 95266 case. Check the behavior of the no-argument and ZIP+4 forms as well, then establish regression coverage showing which generated US ZIP codes and formats are accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.