I am using Magento 2.2.2.

I want to restrict the number of SKU characters to be entered in the Admin Product Detail Page. How to achieve this.

1 Answer 1


Try to update you eav_attribute table

UPDATE eav_attribute SET frontend_class = "validate-length maximum-length-11" where attribute_code = 'sku'
  • how to fix this from code level so whenever we edit the product it will not raised the error "Please enter less or equal than 64 symbols."
    – Narayan
    Commented Oct 18, 2019 at 10:13
  • Nice answer mohan. Commented Mar 23, 2022 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.