diff --git a/src/Validator.php b/src/Validator.php index fa8533d..2c5c98b 100644 --- a/src/Validator.php +++ b/src/Validator.php @@ -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 [2]] - '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 diff --git a/tests/Detain/Tests/ZipZapper/ValidatorTest.php b/tests/Detain/Tests/ZipZapper/ValidatorTest.php index 8f95664..5dbc2eb 100644 --- a/tests/Detain/Tests/ZipZapper/ValidatorTest.php +++ b/tests/Detain/Tests/ZipZapper/ValidatorTest.php @@ -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();