Skip to content

Commit 2eb7c15

Browse files
committed
magento#271: [My Account] Attributes validation: parameter missing in request fix
1 parent eb48f44 commit 2eb7c15

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ public function execute(array $customerData, $addRequiredAttributes = false): vo
4747
$errorInput = [];
4848

4949
foreach ($attributes as $attributeInfo) {
50-
if ($attributeInfo->getIsRequired() && $customerData[$attributeInfo->getAttributeCode()] == '') {
50+
if ($attributeInfo->getIsRequired()
51+
&& (!isset($customerData[$attributeInfo->getAttributeCode()])
52+
|| $customerData[$attributeInfo->getAttributeCode()] == '')
53+
) {
5154
$errorInput[] = $attributeInfo->getDefaultFrontendLabel();
5255
}
5356
}

0 commit comments

Comments
 (0)