Cimpress-MCP / postal-codes-js

Provide postal code validation for javascript
Apache License 2.0
43 stars 36 forks source link

NL postal code validation #58

Closed jEnbuska closed 3 years ago

jEnbuska commented 3 years ago

Looking at Netherlands postalcodes, is seems to me that postalcodes can be just for letters. List of NL Postalcodes

Forexample "3067" (postalcode in Rotterdam) is on the list of NL Postalcodes, but validating it returns: "Postal code 3067 is not valid for country NL"

var postalCodesJs = require("postal-codes-js");
postalCodesJs.validate("NL", "3067") // "Postal code 3067 is not valid for country NL"

I'm I misunderstanding NL postalcodes or is this a bug or uncovered edge case?

Thanks!

ozankaya commented 3 years ago

From the wikipedia page:

Postal codes in the Netherlands, known as postcodes, are alphanumeric, consisting of four digits followed by two uppercase letters.

The Dutch postal codes seem to be all within the range 1000 AA and 9999 ZZ.