AttributeSetUnassignValidator
Magento\Catalog\Model\Product\Attribute\AttributeSetUnassignValidator
What it does
This validator class prevents system attributes from being removed from attribute sets in Magento 2.
Developers use this when implementing attribute set management functionality to ensure critical product attributes (like SKU, name, price) cannot be unassigned, maintaining data integrity.
It checks against a configured list of unassignable attributes and throws an exception if deletion is attempted.
Public Methods
- validate()