Fix postalCode for Portugal (PT)

This commit is contained in:
Axel Wargnier 2018-07-25 12:33:08 +02:00
parent 667ed36b48
commit 4f3aa90d1f
2 changed files with 3 additions and 1 deletions

View file

@ -134,7 +134,7 @@ class PostalCode extends Regex
'PL' => "/^(\d{2}-\d{3})$/",
'PM' => '/^(97500)$/',
'PR' => "/^(\d{9})$/",
'PT' => "/^(\d{7})$/",
'PT' => "/^(\d{7}|\d{4}-\d{3})$/",
'PW' => '/^(96940)$/',
'PY' => "/^(\d{4})$/",
'RE' => "/^((97|98)(4|7|8)\d{2})$/",

View file

@ -93,6 +93,8 @@ class PostalCodeTest extends \PHPUnit_Framework_TestCase
['PL', '99-300'],
['NL', '1012 GX'],
['NL', '1012GX'],
['PT', '3660-606'],
['PT', '3660606'],
];
}