Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class Validator
'HT' => ['####'], // Haiti
'HU' => ['####'], // Hungary, Notes: | 1973 The code defines an area, usually one code per settlement except the six largest towns. One code can identify more (usually) small settlements as well.
'ID' => ['#####'], // Indonesia, Notes: | Kode Pos. Included [[East Timor]] (ranges 88xxx and 89xxx) until 1999, no longer used. For Indonesia postal code information visit [http://kodepos.posindonesia.co.id <nowiki>[2]</nowiki>]
'IE' => ['@## @#@#', '@## @@##', '@## @#@@', '@#W @#@#', '@#W @@##', '@#W @#@@'], // Ireland, Notes: |2015-07-13 Ireland's postcode system (called Eircode) refers to individual properties - not to streets/areas. The first 3 characters are a routing key referring to an area's postal district, and the second 4 characters are a unique identifier for individual properties. See www.eircode.ie for more information. See also [[Republic of Ireland postal addresses]].''
'IE' => ['@## @#@#', '@## @@@#', '@## @@##', '@## @#@@', '@## @###', '@#W @#@#', '@#W @@##', '@#W @#@@'], // Ireland, Notes: |2015-07-13 Ireland's postcode system (called Eircode) refers to individual properties - not to streets/areas. The first 3 characters are a routing key referring to an area's postal district, and the second 4 characters are a unique identifier for individual properties. See www.eircode.ie for more information. See also [[Republic of Ireland postal addresses]].''
'IL' => ['#######'], // Israel, Notes: | 2013 In 2013, after the introduction of the 7 digit codes, 5 digit codes were still being used widely.
'IM' => ['IM# #@@', 'IM## #@@'], // | [[IM postcode area|Isle of Man]], Notes: | 1993 UK-format postcode. The first two letters are always IM.
'IN' => ['######', '## ###'], // India
Expand Down
8 changes: 8 additions & 0 deletions tests/Detain/Tests/ZipZapper/ValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ public function testUkCode()
$this->assertTrue($validator->isValid('GB', 'BD16 3QA'));
}

public function testIrelandCode()
{
$validator = new Validator();
// Please be careful and test Ireland postcodes of public places only, as they identify individual properties.
$this->assertTrue($validator->isValid('IE', 'D09 RHN3'));
$this->assertTrue($validator->isValid('IE', 'D09 V327'));
}

public function testSwissCode()
{
$validator = new Validator();
Expand Down