Skip to content

Commit 40e2363

Browse files
committed
magento#271: [My Account] Attribute validator fix
1 parent 670116c commit 40e2363

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/Magento/CustomerGraphQl/Model/Customer/ValidateCustomerData.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public function execute(array $customerData): void
3636
$attributes = $this->getAllowedCustomerAttributes->execute(array_keys($customerData));
3737
$errorInput = [];
3838

39-
foreach ($attributes as $attributeName => $attributeInfo) {
40-
if ($attributeInfo->getIsRequired() && empty($customerData[$attributeName])) {
41-
$errorInput[] = $attributeName;
39+
foreach ($attributes as $attributeInfo) {
40+
if ($attributeInfo->getIsRequired() && empty($customerData[$attributeInfo->getAttributeCode()])) {
41+
$errorInput[] = $attributeInfo->getDefaultFrontendLabel();
4242
}
4343
}
4444

0 commit comments

Comments
 (0)