Hi,
The Luxembourg postal code validation pattern appears to be incorrect because it does not accept valid Luxembourg postal codes in the official L-XXXX format.
For example:
L-8211
is a valid Luxembourg postal code.
The official documentation from POST Luxembourg explicitly shows Luxembourg addresses using the L-XXXX format, for example:
L-1234 DUDELANGE
L-9874 REMICH
L-2998 LUXEMBOURG
The official postal code database also contains 8211 as a valid postal code for Mamer.
Current behavior
The current Luxembourg regex appears to accept only four numeric digits:
^\d{4}$
As a consequence:
8211 ✅
L-8211 ❌
However, L-8211 is a valid representation of a Luxembourg postal code.
Expected behavior
The validator should accept both representations:
8211 ✅
L-8211 ✅
Ideally, the regex should therefore support the optional L- prefix, for example:
^(?:L-)?\d{4}$
If the validator is intended to be case-insensitive, the corresponding implementation could also allow l-8211.
References
Official POST Luxembourg documentation:
POST Luxembourg — Comment bien rédiger une adresse
POST Luxembourg — Codes postaux (édition du 27 octobre 2025)
The official POST Luxembourg address documentation explicitly uses the L-XXXX format, and the official postal-code list identifies 8211 as a valid postal code for Mamer.
Suggested test cases
I would suggest adding at least the following test cases:
8211 → valid
L-8211 → valid
1234 → valid
L-1234 → valid
123 → invalid
12345 → invalid
L1234 → invalid
Thank you for maintaining this package and for considering this correction.
Hi,
The Luxembourg postal code validation pattern appears to be incorrect because it does not accept valid Luxembourg postal codes in the official L-XXXX format.
For example:
L-8211
is a valid Luxembourg postal code.
The official documentation from POST Luxembourg explicitly shows Luxembourg addresses using the L-XXXX format, for example:
L-1234 DUDELANGE
L-9874 REMICH
L-2998 LUXEMBOURG
The official postal code database also contains 8211 as a valid postal code for Mamer.
Current behavior
The current Luxembourg regex appears to accept only four numeric digits:
^\d{4}$As a consequence:
8211 ✅
L-8211 ❌
However, L-8211 is a valid representation of a Luxembourg postal code.
Expected behavior
The validator should accept both representations:
8211 ✅
L-8211 ✅
Ideally, the regex should therefore support the optional L- prefix, for example:
^(?:L-)?\d{4}$If the validator is intended to be case-insensitive, the corresponding implementation could also allow l-8211.
References
Official POST Luxembourg documentation:
POST Luxembourg — Comment bien rédiger une adresse
POST Luxembourg — Codes postaux (édition du 27 octobre 2025)
The official POST Luxembourg address documentation explicitly uses the L-XXXX format, and the official postal-code list identifies 8211 as a valid postal code for Mamer.
Suggested test cases
I would suggest adding at least the following test cases:
8211 → valid
L-8211 → valid
1234 → valid
L-1234 → valid
123 → invalid
12345 → invalid
L1234 → invalid
Thank you for maintaining this package and for considering this correction.