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.
1 Answer
I recommend to take a look at this GitHub module
https://github.com/experius/Magento-2-Module-Experius-Address-Lines
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 https://codeblog.experius.nl/magento-2-address-fields-customer-registration/