barbieswimcrew/zip-code-validator
Constraint class for international zipcode validation
v4.0.1
2.6M downloads/mo
#3124 most downloaded on Packagist
barbieswimcrew/zip-code-validator
What this package is like to depend on
Last release 2 days 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
3 releases in the last 12 months
see the full history below
Release timeline
35 releases · Aug 2016 to Aug 2026Releases
latest 35-
v4.0.121 Aug 2026Release notes
Open source →Hello Zipcode validators ;-)
Thanks to @jcglombard Luxembourg postal codes now accept the official L-XXXX format in addition to four digits. Both
8211andL-8211are valid.To upgrade run:
$ composer update barbieswimcrew/zip-code-validatorSee changes: v4.0.0...v4.0.1
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v4.0.1/README.md
Highlights:
[IMPROVEMENT] #68 Allow optional L- prefix for Luxembourg postal codes #67 by @jcglombard
Happy validating!
-
v4.0.021 Apr 2026Release notes
Open source →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-validator
See changes: v3.2.0...v4.0.0
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v4.0.0/README.mdHighlights:
[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!
-
v3.2.014 Feb 2026Release notes
Open source →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-validator
See changes: v3.1.5...v3.2.0
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v3.2.0/README.mdHighlights:
[FEATURE] #66 Add Symfony 8 compatibility & Named Arguments support by @Pixelshaped
Happy validating!
-
v3.1.531 Jul 2025Release notes
Open source →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-validatorSee changes: v3.1.4...v3.1.5
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v3.1.5/README.md
Highlights:
[IMPROVEMENT] #62 Add Cuba (CU) support #62 by @damiansakwinski
[IMPROVEMENT] #63 Add support for Namibia (NA) #64 by @damiansakwinskiHappy validating!
-
v3.1.409 Dec 2024Release notes
Open source →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.4Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v3.1.4/README.md
Highlights:
[FIX] #60 (@barbieswimcrew)Happy validating!
-
v3.1.307 Dec 2024Release notes
Open source →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 23To upgrade run:
$ composer update barbieswimcrew/zip-code-validator
See changes: v3.1.2...v3.1.3Documentation: 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!
-
v3.1.223 Jul 2024Release notes
Open source →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-validatorSee changes: v3.1.1...v3.1.2
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v3.1.2/README.md
Highlights:
[IMPROVEMENT] #55 Allow MD- prefix for Moldova postal codes (@Kuller86)
Happy validating!
-
v3.1.118 Feb 2024Release notes
Open source →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-validatorSee changes: v3.1.0...v3.1.1
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v3.1.1/README.md
Highlights:
[IMPROVEMENT] #52 chore: add testrun for PHP 8.3, symfony 7.0 (@Chris53897 )
[IMPROVEMENT] #53 chore: allow phpunit 11 (@Chris53897 )Happy validating!
-
v3.1.002 May 2023Release notes
Open source →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-validatorSee changes: v3.0.0...v3.1.0
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v3.1.0/README.md
Highlights:
- [IMPROVEMENT] #50 Add attribute support, fix uppercase issue with getter (@Pixelshaped )
- [IMPROVEMENT] #49 chore: phpunit 10 (@Chris53897 )
Happy validating!
-
v3.0.007 Feb 2023Nothing published for this version
-
v2.0.224 Jul 2024Release notes
Open source →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-validatorSee changes: v2.0.1...v2.0.2
Documentation: https://github.com/barbieswimcrew/zip-code-validator/blob/v2.0.2/README.md
Highlights:
[IMPROVEMENT] #57 Allow MD- prefix for Moldova postal codes (#55) (@Kuller86)
Happy validating!
-
v2.0.110 Apr 2022Nothing published for this version
-
v2.0.022 Sep 2021Nothing published for this version
-
v1.3.613 Sep 2021Nothing published for this version
-
v1.3.528 Jun 2019Nothing published for this version
-
v1.3.427 Jun 2019Nothing published for this version
-
v1.3.331 May 2019Nothing published for this version
-
v1.3.228 Feb 2019Nothing published for this version
-
v1.3.112 Oct 2018Nothing published for this version
-
v1.3.008 Oct 2018Nothing published for this version
-
v1.2.101 Oct 2018Nothing published for this version
-
v1.2.002 May 2018Nothing published for this version
-
v1.1.426 Jan 2018Nothing published for this version
-
v1.1.306 Dec 2017Nothing published for this version
-
v1.1.221 Sep 2017Nothing published for this version
-
v1.1.130 Jun 2017Nothing published for this version
-
v1.1.006 Jun 2017Nothing published for this version
-
v1.0.906 Jun 2017Nothing published for this version
-
v1.0.805 Apr 2017Nothing published for this version
-
v1.0.718 Oct 2016Nothing published for this version
-
v1.0.605 Oct 2016Nothing published for this version
-
v1.0.512 Sep 2016Nothing published for this version
-
v1.0.416 Aug 2016Nothing published for this version
-
1.0.205 Aug 2016Nothing published for this version
-
1.0.005 Aug 2016Nothing published for this version