Admin configuration is able to set it in range 1-4
1 Answer
I created a plugin etc/frontend/di.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
<plugin name="rewrite-street" type="Vendor\Module\Model\Checkout\LayoutProcessorPlugin" sortOrder="10"/>
</type>
It looks like
public function afterProcess(
\Magento\Checkout\Block\Checkout\LayoutProcessor $subject,
array $jsLayout
) {
$jsLayout['components']['checkout']['children']['steps']['children']['authorization-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['street']['children'][0]['validation']
['required-entry'] = false;
$jsLayout['components']['checkout']['children']['steps']['children']['authorization-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['street']['children'][0]['validation']
['min_text_length'] = 0;
return $jsLayout;
}
Than you just need to catch the request in Magento\Quote\Model\Quote and set to it custom value or rewrite js/action/set-payment-information.js and js/action/set-shipping-information.js with the same way. I know this is someway bad, but it is works for me