How can I ignore this error without changing the require of the attribute?
- If the attribute is required but not provided at customer creation it fail backend validation. Consider a default value.
- To remove frontend validation you have to make sure the attribute is not used in said forms.
- Each Customer Attribute has a value that controls in which forms is used.
- That value is called used_in_forms and it can be altered in an install script with the help of the Magento\Customer\Setup\CustomerSetup entity.
E.g. This piece of script makes the Customer Attribute is_authorised be used only in adminhtml_customer form.
/** * is_authorised */ $authorisedAttribute = $this->customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'is_authorised') ->addData( [ 'attribute_set_id' => $attributeSetId, 'attribute_group_id' => $attributeGroupId, 'used_in_forms' => ['adminhtml_customer'], ] ); $authorisedAttribute->save();