yireo / magento2-hyva-checkout-postcode-validator
N/A
Installs: 1 038
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 3
Forks: 3
Type:magento2-module
Requires
- hyva-themes/magento2-hyva-checkout: ^1.1
- magento/framework: ^102.0 || ^103.0
- magento/module-directory: ^100.0
This package is auto-updated.
Last update: 2024-11-11 16:06:49 UTC
README
This Magento 2 module adds postcode validation based upon the Magento core zip_codes.xml
mechanism to the Hyva Checkout (aka MageWire Checkout)
Installation
composer require yireo/magento2-hyva-checkout-postcode-validator bin/magento module:enable Yireo HyvaCheckoutPostcodeValidator
Usage
This module implements the Magento \Magento\Directory\Model\Country\Postcode\ValidatorInterface
in 3 different ways:
- Client-side (JS) validation directly on postcode input (with a spinner);
- Lazy client-side (Hyva Checkout validation) based on MageWire validator;
- The Hyva Checkout form hook
form:build:magewire
is used to allow for the final form submission to be validated;
Todos
- Check with Yireo ExtensionChecker properly
- Setup GitHub actions