Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit 127835e

Browse files
committed
Add depency with module-directory and add better method to get is zip code is optional
1 parent 676cd1b commit 127835e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/CustomerGraphQl/Model/Customer/Address/CreateCustomerAddress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function validateData(array $addressData): void
111111
$errorInput = [];
112112

113113
//Add error for empty postcode with country with no optional ZIP
114-
if (!in_array($addressData['country_id'], $this->directoryData->getCountriesWithOptionalZip())
114+
if (!$this->directoryData->isZipCodeOptional($addressData['country_id'])
115115
&& (!isset($addressData['postcode']) || empty($addressData['postcode']))
116116
) {
117117
$errorInput[] = 'postcode';

app/code/Magento/CustomerGraphQl/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"type": "magento2-module",
55
"require": {
66
"php": "~7.1.3||~7.2.0||~7.3.0",
7-
"magento/module-customer": "*",
87
"magento/module-authorization": "*",
98
"magento/module-customer": "*",
109
"magento/module-eav": "*",
1110
"magento/module-graph-ql": "*",
1211
"magento/module-newsletter": "*",
1312
"magento/module-integration": "*",
1413
"magento/module-store": "*",
15-
"magento/framework": "*"
14+
"magento/framework": "*",
15+
"magento/module-directory": "*"
1616
},
1717
"license": [
1818
"OSL-3.0",

0 commit comments

Comments
 (0)