Fix postal code for The Netherlands

Postal code for NL allows for a space between the digits and the
letters.

Co-authored-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
Sebastian 2017-11-09 21:05:16 +01:00 committed by Henrique Moody
parent 4fdd2da19e
commit 8fc2484428
No known key found for this signature in database
GPG key ID: 221E9281655813A6
2 changed files with 3 additions and 1 deletions

View file

@ -122,7 +122,7 @@ class PostalCode extends Regex
'NF' => "/^(\d{4})$/",
'NG' => "/^(\d{6})$/",
'NI' => "/^(\d{7})$/",
'NL' => "/^(\d{4}[A-Z]{2})$/",
'NL' => "/^(\d{4} ?[A-Z]{2})$/",
'NO' => "/^(\d{4})$/",
'NP' => "/^(\d{5})$/",
'NZ' => "/^(\d{4})$/",

View file

@ -91,6 +91,8 @@ class PostalCodeTest extends \PHPUnit_Framework_TestCase
['US', '02179'],
['YE', ''],
['PL', '99-300'],
['NL', '1012 GX'],
['NL', '1012GX'],
];
}