bchavez / Bogus

:card_index: A simple fake data generator for C#, F#, and VB.NET. Based on and ported from the famed faker.js.
Other
8.62k stars 491 forks source link

Invalid Zip Codes (US) #481

Open llamuh opened 1 year ago

llamuh commented 1 year ago

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.