Magento 2:How to add custom validation in Address book form?

by Magento   Last Updated October 09, 2019 17:09 PM

Hello i want to add custom validation in address book of customer Account dashboard, when the customer is sign in they have one tab address information in that when we add new address that open form i want to add validation for postcode and telephone number which are accept only number please help me how can i do that.

Answers 1

I recommend to take a look at this GitHub module


Mage2 Module Experius AddressLines,

Adds labels to address lines and adds configuration per address line.

Configuration Per Line (Required Entry Yes/No, Label and Validation Classes)

Stores > Configuration > Customers > Customer Configuration > Address Lines

This module also works on the Customer Account Address Edit pages and if you enable the Address to Display on the Customer Registration Page it will also show there.

For more information how to Display the Address on the Customer Registration Page take a look at this blog article #Mr. Lewis wrote

Partab Saifuddin Zakir
Partab Saifuddin Zakir
October 09, 2019 16:20 PM

Related Questions