Invalid Zip Codes (US)
Author: llamuhCreated Jun 29, 2023Updated Jun 29, 2025
Labelsquestion
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.
Source: bchavez/Bogus