Created
December 10, 2017 19:07
-
-
Save springerin/a64d36c8458e62ad0900189edb6a3d64 to your computer and use it in GitHub Desktop.
add custom validation to checkout shipping address field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- | |
/** | |
* Copyright © 2013-2017 Magento, Inc. All rights reserved. | |
* See COPYING.txt for license details. | |
*/ | |
--> | |
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<body> | |
<referenceBlock name="checkout.root"> | |
<arguments> | |
<argument name="jsLayout" xsi:type="array"> | |
<item name="components" xsi:type="array"> | |
<item name="checkout" xsi:type="array"> | |
<item name="children" xsi:type="array"> | |
<item name="steps" xsi:type="array"> | |
<item name="children" xsi:type="array"> | |
<item name="shipping-step" xsi:type="array"> | |
<item name="children" xsi:type="array"> | |
<item name="shippingAddress" xsi:type="array"> | |
<item name="children" xsi:type="array"> | |
<item name="shipping-address-fieldset" xsi:type="array"> | |
<item name="children" xsi:type="array"> | |
<item name="vat_id" xsi:type="array"> | |
<item name="validation" xsi:type="array"> | |
<item name="custom_validation" xsi:type="boolean">true</item> | |
</item> | |
</item> | |
</item> | |
</item> | |
</item> | |
</item> | |
</item> | |
</item> | |
</item> | |
</item> | |
</item> | |
</item> | |
</item> | |
</argument> | |
</arguments> | |
</referenceBlock> | |
</body> | |
</page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment