I have overrided customer edit form. But while saving record I'm getting error message
"Telephone" is a required value.
I don't want telephone field. So in my form telephone field is not there but still error is coming.
magento2magento2.2
I have overrided customer edit form. But while saving record I'm getting error message
"Telephone" is a required value.
I don't want telephone field. So in my form telephone field is not there but still error is coming.
Best Answer
There is a Magento2 feature that is by default telephone field is required. There is a lot of discussion on below topic:
https://github.com/magento/magento2/issues/1691
There is also a suggestion on this topic that we can make it optional by running SQL script
Read full topic and then run the query.
Note: Take a backup of DB before making any change.
After run query check
eav_attribute
table and make sure attribute column value changed tois_required
to0
.Run reindex command for attributes only
and delete all cache and static files, compile and regenerate code by below command
Hope this will help you.