https://github.com/mageprashant/magento2-checkout-address-restriction
Magento 2: Add Custom Address Validation In Checkout
https://github.com/mageprashant/magento2-checkout-address-restriction
address address-restriction address-validation checkout checkout-address magento magento2 magento2-free-modules module restrictions validation
Last synced: 6 months ago
JSON representation
Magento 2: Add Custom Address Validation In Checkout
- Host: GitHub
- URL: https://github.com/mageprashant/magento2-checkout-address-restriction
- Owner: mageprashant
- Created: 2023-01-17T17:14:18.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-03T10:43:59.000Z (over 3 years ago)
- Last Synced: 2025-05-20T02:43:46.562Z (about 1 year ago)
- Topics: address, address-restriction, address-validation, checkout, checkout-address, magento, magento2, magento2-free-modules, module, restrictions, validation
- Language: PHP
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Magento 2 Checkout Address Restriction Extension FREE
Magento 2 Add Custom Address Validation In Checkout.
Magento 2 has its own set of validations for the address fields in the checkout step. But sometimes you may want to add some custom validations in the different address fields. Some examples may be like limiting the character limit in the firstname and lastname of shipping and billing address.
Use cases:
Some ERP systems have certain limits on the length of fields that they can store. But Magento has no such limit on these fields. So while exporting the order data to the ERP you may face problems.
Fortunately, we can handle this problem in Magento 2 with some effort. We will start by creating a new module for this functionality.
# Installation Instruction
## Step 1
### Install module via composer (recommend)
Run the following command in Magento 2 root folder:
```
composer require mageprashant/magento2-checkout-address-restriction
```
### Install module manually
* Download the extension
* Unzip the file
* Create a folder {Magento 2 root}/app/code/MagePrashant/Addressrestriction
* Copy the content from the unzip folder
#### Step 2 - Enable Module
* php bin/magento module:enable MagePrashant_Addressrestriction
* php bin/magento setup:upgrade
#### Step 3 - Configuration
Log into your Magento 2 Admin, then go to Stores > Configuration > MagePrashant > Address Restrictions
# Contribution
Want to contribute to this extension? The quickest way is to open a pull request on GitHub.
# Support
If you encounter any problems or bugs, please open an issue on GitHub.