Download the PHP package hryvinskyi/magento2-quote-address-validator without Composer

On this page you can find all versions of the php package hryvinskyi/magento2-quote-address-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magento2-quote-address-validator

Hryvinskyi_QuoteAddressValidator

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require Scrutinizer Code Quality workflow

Overview

The Hryvinskyi_QuoteAddressValidator module provides validation for quote addresses in Magento 2. It allows administrators to configure regex patterns and error messages for validating various address fields such as lastname and street.

Installation

  1. Composer Installation:

  2. Enable the Module:

  3. Clear Cache:

Configuration

  1. Navigate to Stores > Configuration > Security > Quote Address Validator.
  2. Configure the following fields:
    • Enable: Set to Yes to enable the module.
    • Validation Type: Select the type of validation to apply to the address fields.
      • Validate by Regex - Validate the address fields using a regex pattern.
      • Validate by stopwords - Validate the address fields using a list of stopwords.
      • Validate by stopwords and regex - Validate the address fields using a list of stopwords and a regex pattern.
    • Enable Firstname Validation Set to Yes to enable validation for the firstname field.
    • Firstname Stopwords Enter a list of stopwords to validate the firstname field.
    • Firstname Regex Enter a regex pattern to validate the firstname field.
    • Firstname Error Message Enter an error message to display when the firstname field does not match the pattern.
    • Enable Lastname Validation Set to Yes to enable validation for the lastname field.
    • Lastname Stopwords: Enter a list of stopwords to validate the lastname field.
    • Lastname Regex: Enter a regex pattern to validate the lastname field.
    • Lastname Error Message: Enter an error message to display when the lastname field does not match the pattern.
    • Enable Street Validation Set to Yes to enable validation for the street field.
    • Street Stopwords: Enter a list of stopwords to validate the street field.
    • Street Regex: Enter a regex pattern to validate the street field.
    • Street Error Message: Enter an error message to display when the street field does not match the pattern.

Command Line Interface

The module provides a command-line interface (CLI) to validate quote addresses. To use the CLI, run the following command:

This command will validate all existing quote addresses and display any errors that are found. This is useful for detecting country-specific errors in addresses and names and changing Regex patterns for validation.

Console Responce Example. Click to expand ![console_response.png](./docs/images/console_response.png)

Example Regex Patterns

Explanation of Regex

Notes

Preference for \Magento\Quote\Model\BillingAddressManagement added only for correct error message display. (added LocalizedException catch to assign method)

Demo Backend

Configuration ![Admin](./docs/images/configuration_settings_stores_magento_admin.gif)

Demo Frontend

Checkout shipping address validation ![checkout](./docs/images/checkout_testing.gif)
Checkout billing address validation ![checkout](./docs/images/checkout_testing_billing.gif)

All versions of magento2-quote-address-validator with dependencies

PHP Build Version
Package Version
Requires php Version ~7.3.0||~7.4.0||~8.0||~8.1||~8.2||~8.3
magento/framework Version *
magento/module-quote Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hryvinskyi/magento2-quote-address-validator contains the following files

Loading the files please wait ....