faker
faker copied to clipboard
Localization for NL is not valid for postalCodes
Pre-Checks
- [X] Follow our Code of Conduct.
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Faker issue and not related to a combination with another package.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
- [x] I am willing to provide a PR.
Describe the bug
According to the postalCode patterns for the netherlands the following example is allowed in https://github.com/faker-js/faker/blob/v8/src/locales/nl/location/postcode.ts:
1### SS ... 9### SS
same for SA/SD
This is not allowed according to:
https://en.wikipedia.org/wiki/Postal_codes_in_the_Netherlands#:~:text=The%20letter%20combinations%20'SS'%2C,Nazi%20occupation%20of%20the%20Netherlands.&text=The%20first%20two%20digits%20indicate,usually%20on%20the%20same%20street.
Minimal reproduction code
import { fakerNL as faker } from '@faker-js/faker';
console.log(faker.location.zipCode()); // until you hit any of the combos
Additional Context
No response
Environment Info
Faker 8.4.1
Which module system do you use?
- [X] CJS
- [ ] ESM
Used Package Manager
yarn
Likely requires https://github.com/faker-js/faker/pull/3233 to be implemented first.