Skip to content

Commit

Permalink
Fix postal code for The Netherlands
Browse files Browse the repository at this point in the history
Postal code for NL allows for a space between the digits and the
letters.

Co-authored-by: Henrique Moody <[email protected]>
  • Loading branch information
pontoffeltier and henriquemoody committed Jun 29, 2018
1 parent 4fdd2da commit 8fc2484
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library/Rules/PostalCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -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})$/",
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/Rules/PostalCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ public function validPostalCodesProvider()
['US', '02179'],
['YE', ''],
['PL', '99-300'],
['NL', '1012 GX'],
['NL', '1012GX'],
];
}

Expand Down

0 comments on commit 8fc2484

Please sign in to comment.