Skip to main content

I want to make the post codepostcode filed a required filed in the checkout process. I am sure that by default, this IS a required but for some reason, it isn't onin my store.

I know there is entry in vendor/magento/module-checkout/view/frontend/layout/checkout_index_index.xml that makes the filed required:

<item name="postcode" xsi:type="array">
     <!-- post-code field has custom UI component -->
     <item name="component" xsi:type="string">Magento_Ui/js/form/element/post-code</item>
     <item name="validation" xsi:type="array">
     <item name="required-entry" xsi:type="string">true</item></item>
</item>

But I can't see my theme overwriting this file anywhere but just to be sure I added the original file from vendor to my theme folder. Still no luck.

How else would I debug this issue?

Running on:

  • Magento 2.1.8
  • Custom theme "Venustheme/cricket"
  • Nginx

I want to make the post code filed a required filed in the checkout process. I am sure that by default, this IS a required but for some reason it isn't on my store.

I know there is entry in vendor/magento/module-checkout/view/frontend/layout/checkout_index_index.xml that makes the filed required:

<item name="postcode" xsi:type="array">
     <!-- post-code field has custom UI component -->
     <item name="component" xsi:type="string">Magento_Ui/js/form/element/post-code</item>
     <item name="validation" xsi:type="array">
     <item name="required-entry" xsi:type="string">true</item></item>
</item>

But I can't see my theme overwriting this file anywhere but just to be sure I added the original file from vendor to my theme folder. Still no luck.

How else would I debug this issue?

Running on:

  • Magento 2.1.8
  • Custom theme "Venustheme/cricket"
  • Nginx

I want to make the postcode filed a required filed in the checkout process. I am sure that by default, this IS required but for some reason, it isn't in my store.

I know there is entry in vendor/magento/module-checkout/view/frontend/layout/checkout_index_index.xml that makes the filed required:

<item name="postcode" xsi:type="array">
     <!-- post-code field has custom UI component -->
     <item name="component" xsi:type="string">Magento_Ui/js/form/element/post-code</item>
     <item name="validation" xsi:type="array">
     <item name="required-entry" xsi:type="string">true</item></item>
</item>

But I can't see my theme overwriting this file anywhere but just to be sure I added the original file from vendor to my theme folder. Still no luck.

How else would I debug this issue?

Running on:

  • Magento 2.1.8
  • Custom theme "Venustheme/cricket"
  • Nginx
Source Link
Greg
  • 2.7k
  • 5
  • 41
  • 88

Magento 2 Checkout post code (zip code) is not a required filed

I want to make the post code filed a required filed in the checkout process. I am sure that by default, this IS a required but for some reason it isn't on my store.

I know there is entry in vendor/magento/module-checkout/view/frontend/layout/checkout_index_index.xml that makes the filed required:

<item name="postcode" xsi:type="array">
     <!-- post-code field has custom UI component -->
     <item name="component" xsi:type="string">Magento_Ui/js/form/element/post-code</item>
     <item name="validation" xsi:type="array">
     <item name="required-entry" xsi:type="string">true</item></item>
</item>

But I can't see my theme overwriting this file anywhere but just to be sure I added the original file from vendor to my theme folder. Still no luck.

How else would I debug this issue?

Running on:

  • Magento 2.1.8
  • Custom theme "Venustheme/cricket"
  • Nginx