NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #3233 most downloaded on Packagist
Constraint class for international zipcode validation
Last release 1 months ago
21 Aug 2026
Ships fairly regularly
a new release about every 5 months
Some releases are documented
notes for 10 of 35 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
35 releases · first in 2016
Thanks to @jcglombard Luxembourg postal codes now accept the official L-XXXX format in addition to four digits. Both 8211 and L-8211 are valid.
Hello Zipcode validators ;-)
Thanks to @jcglombard Luxembourg postal codes now accept the official L-XXXX format in addition to four digits. Both 8211 and L-8211 are valid.
To upgrade run:
$ composer update barbieswimcrew/zip-code-validator
See changes: v4.0.0...v4.0.1
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v4.0.1/README.md
[IMPROVEMENT] #68 Allow optional L- prefix for Luxembourg postal codes #67 by @jcglombard
Happy validating!
One column per quarter.
It requires patched symfony/validator versions only (^5.4.43 || ^6.4.11 || ^7.1.4 || ^8.0) to address CVE-2024-50343 ( GHSA-g3rh-rrhp-jhh9 ). If you s…
Hello Zipcode validators ;-)
This v4.0.0 release is a security-focused update. It requires patched symfony/validator versions only (^5.4.43 || ^6.4.11 || ^7.1.4 || ^8.0) to address CVE-2024-50343 (GHSA-g3rh-rrhp-jhh9). If you still run Symfony Validator 4.x or unsupported 5.x / 6.x / 7.0.x lines, upgrade Symfony before updating this package.
We also pinned PHPUnit to patched releases in development (GHSA-qrr6-mg7r-m243), added composer.lock, and set config.platform.php so locks stay reproducible. CI was adjusted (e.g. prefer-lowest on Symfony 5.4; PHP 8.3 with Symfony 7.1). The ZipCode constraint was aligned with current Symfony Constraint behavior where needed.
To upgrade run:
$ composer update barbieswimcrew/zip-code-validatorSee changes: v3.2.0...v4.0.0
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v4.0.0/README.md
[SECURITY] Require patched symfony/validator for CVE-2024-50343; CI updates; ZipCode constraint alignment with Symfony Validator
[SECURITY] Dev: PHPUnit patched versions; track composer.lock; config.platform.php for reproducible resolution
Happy validating!
Thanks to @Pixelshaped the Zipcode Validator is now ready for the future! 🚀 We added support for Symfony 8 and modernized the codebase to support PHP
Hello Zipcode validators ;-)
Thanks to @Pixelshaped the Zipcode Validator is now ready for the future! 🚀
We added support for Symfony 8 and modernized the codebase to support PHP 8 Attributes with Named Arguments. This makes your code even cleaner and more readable.
Example of the new syntax:
#[ZipCode(iso: 'DE')]Don't worry, the old array syntax is still fully supported for backward compatibility!
To upgrade run:
$ composer update barbieswimcrew/zip-code-validatorSee changes: v3.1.5...v3.2.0
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v3.2.0/README.md
[FEATURE] #66 Add Symfony 8 compatibility & Named Arguments support by @Pixelshaped
Happy validating!
Thanks to @damiansakwinski the Zipcode Validator now accepts NA- prefix for Namibia's postal codes as well as CU- prefix for Cuban postal codes. Aweso
Hello Zipcode validators ;-)
Thanks to @damiansakwinski the Zipcode Validator now accepts NA- prefix for Namibia's postal codes as well as CU- prefix for Cuban postal codes. Awesome!!!
To upgrade run:
$ composer update barbieswimcrew/zip-code-validator
See changes: v3.1.4...v3.1.5
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v3.1.5/README.md
[IMPROVEMENT] #62 Add Cuba (CU) support #62 by @damiansakwinski
[IMPROVEMENT] #63 Add support for Namibia (NA) #64 by @damiansakwinski
Happy validating!
Sorry for another minor fix... and thanks for that catch @dsbe-ak #59 (comment)
Hello Zipcode validators ;-)
Sorry for another minor fix... and thanks for that catch @dsbe-ak
#59 (comment)
To upgrade run:
$ composer update barbieswimcrew/zip-code-validator
See changes: v3.1.3...v3.1.4
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v3.1.4/README.md
Highlights:
[FIX] #60 (@barbieswimcrew)
Happy validating!
This minor fixes the deprecation warning
Hello Zipcode validators ;-)
This minor fixes the deprecation warning
Deprecated: ZipCodeValidator\Constraints\ZipCode::__construct(): Implicitly marking parameter $groups as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/barbieswimcrew/zip-code-validator/src/ZipCodeValidator/Constraints/ZipCode.php on line 23
To upgrade run:
$ composer update barbieswimcrew/zip-code-validator
See changes: v3.1.2...v3.1.3
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v3.1.3/README.md
Highlights:
[FIX] #59 Fix "Implicitly marking parameter $groups as nullable is deprecated" (#59) (@barbieswimcrew)
Happy validating!
Thanks to @Kuller86 the Zipcode Validator now accepts MD- prefix for Moldova's postal codes. Awesome!!!
Hello Zipcode validators ;-)
Thanks to @Kuller86 the Zipcode Validator now accepts MD- prefix for Moldova's postal codes. Awesome!!!
To upgrade run:
$ composer update barbieswimcrew/zip-code-validator
See changes: v3.1.1...v3.1.2
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v3.1.2/README.md
[IMPROVEMENT] #55 Allow MD- prefix for Moldova postal codes (@Kuller86)
Happy validating!
Thanks to @Chris53897 effort, Zipcode Validator now relies on PHPUnit 11 as well as got testrun for PHP 8.3 and Symfony 7. Awesome!!!
Hello Zipcode validators ;-)
Thanks to @Chris53897 effort, Zipcode Validator now relies on PHPUnit 11 as well as got testrun for PHP 8.3 and Symfony 7. Awesome!!!
To upgrade run:
$ composer update barbieswimcrew/zip-code-validator
See changes: v3.1.0...v3.1.1
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v3.1.1/README.md
[IMPROVEMENT] #52 chore: add testrun for PHP 8.3, symfony 7.0 (@Chris53897 )
[IMPROVEMENT] #53 chore: allow phpunit 11 (@Chris53897 )
Happy validating!
Thanks to @Chris53897 and @Pixelshaped for their contribution to this project. Thanks to their effort, Zipcode Validator can be used via Attributes fr
Hello Zipcode validators ;-)
Thanks to @Chris53897 and @Pixelshaped for their contribution to this project. Thanks to their effort, Zipcode Validator can be used via Attributes from now on and relies on PHPUnit 10! Isn't that great?
To upgrade run:
$ composer update barbieswimcrew/zip-code-validator
See changes: v3.0.0...v3.1.0
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v3.1.0/README.md
Happy validating!
Nothing published for this version
Thanks to @Kuller86 the Zipcode Validator now accepts MD- prefix for Moldova's postal codes. Awesome!!!
Hello Zipcode validators ;-)
Thanks to @Kuller86 the Zipcode Validator now accepts MD- prefix for Moldova's postal codes. Awesome!!!
To upgrade run:
$ composer update barbieswimcrew/zip-code-validator
See changes: v2.0.1...v2.0.2
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v2.0.2/README.md
[IMPROVEMENT] #57 Allow MD- prefix for Moldova postal codes (#55) (@Kuller86)
Happy validating!
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →