Skip to content

Commit 7ce6016

Browse files
committed
MC-40387: Canada Zip Code does not work for Pick in Store delivery method
1 parent cd857f9 commit 7ce6016

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
<codes>
8484
<code id="pattern_1" active="true" example="A1B 2C3">^[a-zA-z]{1}[0-9]{1}[a-zA-z]{1}\s[0-9]{1}[a-zA-z]{1}[0-9]{1}$</code>
8585
<code id="pattern_2" active="true" example="A1B2C3">^[a-zA-z]{1}[0-9]{1}[a-zA-z]{1}[0-9]{1}[a-zA-z]{1}[0-9]{1}$</code>
86+
<code id="pattern_3" active="true" example="A1B">^[a-zA-z]{1}[0-9]{1}[a-zA-z]{1}$</code>
8687
</codes>
8788
</zip>
8889
<zip countryCode="IC">

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ public function getCanadaValidPostCodes()
8080
return [
8181
['countryId' => 'CA', 'postcode' => 'A1B2C3'],
8282
['countryId' => 'CA', 'postcode' => 'A1B 2C3'],
83+
['countryId' => 'CA', 'postcode' => 'A1B'],
8384
['countryId' => 'CA', 'postcode' => 'Z9Y 8X7'],
8485
['countryId' => 'CA', 'postcode' => 'Z9Y8X7'],
86+
['countryId' => 'CA', 'postcode' => 'Z9Y'],
8587
];
8688
}
8789

0 commit comments

Comments
 (0)