Skip to content

Commit

Permalink
Add depency with module-directory and add better method to get is zip…
Browse files Browse the repository at this point in the history
… code is optional
  • Loading branch information
osrecio committed Oct 27, 2019
1 parent 676cd1b commit 127835e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function validateData(array $addressData): void
$errorInput = [];

//Add error for empty postcode with country with no optional ZIP
if (!in_array($addressData['country_id'], $this->directoryData->getCountriesWithOptionalZip())
if (!$this->directoryData->isZipCodeOptional($addressData['country_id'])
&& (!isset($addressData['postcode']) || empty($addressData['postcode']))
) {
$errorInput[] = 'postcode';
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/CustomerGraphQl/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"type": "magento2-module",
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"magento/module-customer": "*",
"magento/module-authorization": "*",
"magento/module-customer": "*",
"magento/module-eav": "*",
"magento/module-graph-ql": "*",
"magento/module-newsletter": "*",
"magento/module-integration": "*",
"magento/module-store": "*",
"magento/framework": "*"
"magento/framework": "*",
"magento/module-directory": "*"
},
"license": [
"OSL-3.0",
Expand Down

0 comments on commit 127835e

Please sign in to comment.