Skip to content

Commit c2a5e57

Browse files
committed
Validate only changed fields
1 parent 8d4d0c0 commit c2a5e57

File tree

1 file changed

+6
-2
lines changed
  • app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute

1 file changed

+6
-2
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Validate.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ public function execute()
5656
unset($attributesData[$attributeCode]);
5757
continue;
5858
}
59-
$data->setData($attributeCode, $value);
60-
$attribute->getBackend()->validate($data);
59+
60+
$isChanged = (bool)$this->getRequest()->getPost('toggle_' . $attributeCode);
61+
if ($isChanged) {
62+
$data->setData($attributeCode, $value);
63+
$attribute->getBackend()->validate($data);
64+
}
6165
}
6266
}
6367
} catch (\Magento\Eav\Model\Entity\Attribute\Exception $e) {

0 commit comments

Comments
 (0)