faker icon indicating copy to clipboard operation
faker copied to clipboard

Localization for NL is not valid for postalCodes

Open MDSLKTR opened this issue 10 months ago • 1 comments

Pre-Checks

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

MDSLKTR avatar Jan 09 '25 13:01 MDSLKTR

Likely requires https://github.com/faker-js/faker/pull/3233 to be implemented first.

matthewmayer avatar Jan 09 '25 15:01 matthewmayer