I would appreciate any help on how to add maxlength to street address column in backend via data patch

1 Answer 1


You can not do this using a data patch. Street address is a multiline attribute:


If you check in customer_address_entity, column street you will see it is a text with 65535 characters.

I would recommend using frontend validation for this. You can have a look here for more information:

Magento 2: How to set Max Length for Street Address?

  • Thanks for the contribution I used data patch to solve that . I understand that its a multi line attribute but that was the request. It was also enforced on the frontend so its all good. Its a headless proj by the way
    – Felix
    Oct 21, 2020 at 13:38

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.