Skip to content

Commit 0a8d612

Browse files
author
Oleksandr Dubovyk
committed
MC-39520: Error - Provided countryId does not exist
- fixed coded
1 parent d66ef1f commit 0a8d612

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

app/code/Magento/Directory/etc/zip_codes.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@
7575
</zip>
7676
<zip countryCode="BH">
7777
<codes>
78-
<code id="pattern_1" active="true" example="10200">^((1[0-2]|[2-9])\d{2})?$</code>
78+
<code id="pattern_1" active="true" example="323">^((1[0-2]|[1-9])\d{2})?$</code>
7979
</codes>
8080
</zip>
8181
<zip countryCode="BM">
8282
<codes>
83-
<code id="pattern_1" active="true" example="AB A012">^[A-Z]{2}[ ]?[A-Z0-9]{2}$</code>
83+
<code id="pattern_1" active="true" example="MA 02">^[A-Z]{2}[ ]?[A-Z0-9]{2}$</code>
8484
</codes>
8585
</zip>
8686
<zip countryCode="BN">
@@ -262,7 +262,7 @@
262262
</zip>
263263
<zip countryCode="GH">
264264
<codes>
265-
<code id="pattern_1" active="true" example="AB1 2CD">^[A-Z][A-Z0-9]\d{3,5}$</code>
265+
<code id="pattern_1" active="true" example="GA18400">^[A-Z][A-Z0-9]\d{3,5}$</code>
266266
</codes>
267267
</zip>
268268
<zip countryCode="GL">
@@ -758,7 +758,7 @@
758758
</zip>
759759
<zip countryCode="TT">
760760
<codes>
761-
<code id="pattern_1" active="true" example="12345">^\d{6}$</code>
761+
<code id="pattern_1" active="true" example="120110">^\d{6}$</code>
762762
</codes>
763763
</zip>
764764
<zip countryCode="TW">

dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ public function getPostcodesDataProvider()
106106
['countryId' => 'BD', 'postcode' => '1234'],
107107
['countryId' => 'BE', 'postcode' => '1234'],
108108
['countryId' => 'BG', 'postcode' => '1234'],
109-
['countryId' => 'BH', 'postcode' => '10200'],
110-
['countryId' => 'BM', 'postcode' => 'AB A012'],
109+
['countryId' => 'BH', 'postcode' => '323'],
110+
['countryId' => 'BH', 'postcode' => '1209'],
111+
['countryId' => 'BM', 'postcode' => 'MA 02'],
111112
['countryId' => 'BN', 'postcode' => 'PS1234'],
112113
['countryId' => 'BR', 'postcode' => '12345678'],
113114
['countryId' => 'BR', 'postcode' => '12345-678'],
@@ -151,7 +152,7 @@ public function getPostcodesDataProvider()
151152
['countryId' => 'GF', 'postcode' => '12345'],
152153
['countryId' => 'GG', 'postcode' => 'PL5 7TH'],
153154
['countryId' => 'GL', 'postcode' => '1234'],
154-
['countryId' => 'GH', 'postcode' => 'AB1 2CD'],
155+
['countryId' => 'GH', 'postcode' => 'GA18400'],
155156
['countryId' => 'GN', 'postcode' => '123'],
156157
['countryId' => 'GP', 'postcode' => '12345'],
157158
['countryId' => 'GR', 'postcode' => '123 45'],
@@ -251,7 +252,7 @@ public function getPostcodesDataProvider()
251252
['countryId' => 'TM', 'postcode' => '123456'],
252253
['countryId' => 'TN', 'postcode' => '1234'],
253254
['countryId' => 'TR', 'postcode' => '12345'],
254-
['countryId' => 'TT', 'postcode' => '12345'],
255+
['countryId' => 'TT', 'postcode' => '120110'],
255256
['countryId' => 'TW', 'postcode' => '123'],
256257
['countryId' => 'TW', 'postcode' => '12345'],
257258
['countryId' => 'UA', 'postcode' => '02232'],

0 commit comments

Comments
 (0)