I want to make the zip-code fields on my website required, no matter the country the address is from. I've checked the magento settings

Stores -> configuration -> general -> general -> country options

and under Zip/Postal Code is Optional for, there's always one country selected, I can't unSelect it. I have unchecked use system value.

Do I have to have at least one selected ?

  • You can always update it directly in the database table core_config_data where path is general/country/optional_zip_countries. Just to note many countries do not have a postcode which is why this can be configured and is not always required. – Barry Oct 17 '19 at 10:13
  • I'll keep that in mind, thanks. We're only selling in one country so no need to worry about others for now – Badong Oct 17 '19 at 10:42

You can unselect it. For that first select any single country option there and then click on that option with CTRL key, after that you can save configuration and clear/flush cache using below commands

php bin/magento cache:clean
php bin/magento cache:flush

Hope this will help you!

| improve this answer | |
  • Oh well, this was kind of a dumb question haha Many thanks ! – Badong Oct 17 '19 at 10:39
  • is that working for you ? :D – Kishan Savaliya Oct 17 '19 at 10:39
  • Yeah it did work :) – Badong Oct 17 '19 at 10:40
  • Okay, Buddy. ;) – Kishan Savaliya Oct 17 '19 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.