diff --git a/library/Rules/PostalCode.php b/library/Rules/PostalCode.php index a94e3fa5..cc0f49d8 100644 --- a/library/Rules/PostalCode.php +++ b/library/Rules/PostalCode.php @@ -131,7 +131,7 @@ class PostalCode extends Regex 'PG' => "/^(\d{3})$/", 'PH' => "/^(\d{4})$/", 'PK' => "/^(\d{5})$/", - 'PL' => "/^(\d{5})$/", + 'PL' => "/^(\d{2}-\d{3})$/", 'PM' => '/^(97500)$/', 'PR' => "/^(\d{9})$/", 'PT' => "/^(\d{7})$/", diff --git a/tests/unit/Rules/PostalCodeTest.php b/tests/unit/Rules/PostalCodeTest.php index 9688f802..76bf9227 100644 --- a/tests/unit/Rules/PostalCodeTest.php +++ b/tests/unit/Rules/PostalCodeTest.php @@ -90,6 +90,7 @@ class PostalCodeTest extends \PHPUnit_Framework_TestCase ['GB', 'PR1 9LY'], ['US', '02179'], ['YE', ''], + ['PL', '99-300'], ]; } @@ -123,6 +124,7 @@ class PostalCodeTest extends \PHPUnit_Framework_TestCase ['GB', 'PR19LY'], ['US', '021 79'], ['YE', '02179'], + ['PL', '99300'], ]; } }