Skip to content

Commit 6ac4eb5

Browse files
committed
magento#1029 Add string postcode and comment
1 parent 5fbdb4b commit 6ac4eb5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,11 @@ public function validateData(array $addressData): void
110110
$attributes = $this->getAllowedAddressAttributes->execute();
111111
$errorInput = [];
112112

113+
//Add error for empty postcode with country with no optional ZIP
113114
if (!in_array($addressData['country_id'], $this->directoryData->getCountriesWithOptionalZip())
114115
&& (!isset($addressData['postcode']) || empty($addressData['postcode']))
115116
) {
116-
$errorInput[] = $addressData['postcode'];
117+
$errorInput[] = 'postcode';
117118
}
118119

119120
foreach ($attributes as $attributeName => $attributeInfo) {

0 commit comments

Comments
 (0)