﻿#### 

On one of my project I got a requirement to support all countries and cities from all over the world. If you install Storefront site from scratch you can see that OOTB Sitecore supports only two regions: Canada and United States.

![](https://www.brimit.com/-/media/images/blog/sitecore-commerce-9-disable-address-validation-for-state-and-country.png)

The problem is that you need to create all regions and cities manually in Commerce Control Panel and assign them to Country-Region Storefront configuration. It’s a huge work for content editors.

When you create customer address, submit shipping and billing checkout steps commerce engine validates county and city based on Country-Region Storefront configuration. In my case I looked for any solution, which can just disable validation for State/County.

After some investigation I found, that Sitecore.Commerce.Core.ValidatePartyBlock is responsible for this validation. ValidatePartyBlock is a part of IValidatePartyPipeline. If you don’t need validation for State/County you can just remove this block from IValidatePartyPipeline in your ConfigureSitecore.cs:

  ![](https://www.brimit.com/-/media/images/blog/sitecore-commerce-9-disable-address-validation-for-state-and-country2.png)

I hope it’s useful hack to disable validation for State/County.

###### Author

[!\[apaliakou\](https://www.brimit.com/-/jssmedia/feature/blogs/authors/apaliakou.jpg?h=216&amp;iar=0&amp;w=360&amp;hash=5BE96F17AE5B47F66D9F684B87773675)
Andrei Paliakou
Sitecore MVP/ Lead Developer](https://www.brimit.com/blog/author?authors=Andrei%20Paliakou)

#### More on Sitecore

[!\[How Vercel Will Help You Save Effort When Deploying Sophisticated Sitecore Projects\](https://www.brimit.com/-/jssmedia/project/brimit/blog/2024/vercel_cover-image.png)
#Guides#How-toDXPE-commerce
##### How Vercel Will Help You Save Effort When Deploying Sophisticated Sitecore Projects
Optimize and accelerate the development and deployment of complex multisite Sitecore projects.
Alexei Vershalovich on July 17, 2024](https://www.brimit.com/blog/how-vercel-will-help-you-save-effort-when-deploying-sophisticated-sitecore-projects)

[!\[Training Up Tomorrow's Sitecore MVPs: a Mentoring Success Story\](https://www.brimit.com/-/jssmedia/project/brimit/blog/2023/sitecore-mentoring---cover-image.png)
#How-toDXP
##### Training Up Tomorrow's Sitecore MVPs: a Mentoring Success Story
How to participate in the Sitecore Mentor program and help younger colleagues jump-start a career in Sitecore development.
Sergey Baranov on October 2, 2023](https://www.brimit.com/blog/training-up-tomorrows-sitecore-mvps)

[!\[Going Headless. Part 2: When a Headless CMS Is Your Best Bet (if you have Sitecore)\](https://www.brimit.com/-/jssmedia/project/brimit/blog/2022/headless/adobestock_456986731.jpg)
#How-toDXPE-commerce
##### Going Headless. Part 2: When a Headless CMS Is Your Best Bet (if you have Sitecore)
Discover how a headless CMS can benefit organizations that use Sitecore.
Daniil Raschupkin, Palina Trokhautsava on September 15, 2022](https://www.brimit.com/blog/going-headless-part-2-when-a-headless-cms-is-your-best-bet-if-you-have-sitecore)

![](https://bat.bing.net/action/0?ti=187017043&amp;tm=gtm002&amp;Ver=2&amp;mid=a25410e7-fd51-41dd-b23e-e26795d9f607&amp;bo=2&amp;gtm_tag_source=1&amp;pi=0&amp;lg=en-US&amp;sw=800&amp;sh=600&amp;sc=24&amp;nwd=1&amp;tl=Sitecore%20Commerce%209%3A%20Disable%20Address%20validation%20for%20State%2FCountry&amp;kw=Sitecore,%20Commerce,%20cart,%20price,%20membership%20level&amp;p=https%3A%2F%2Fwww.brimit.com%2Fblog%2Fsitecore-commerce-9-disable-address-validation-for-state-country&amp;r=&amp;lt=301&amp;evt=pageLoad&amp;sv=2&amp;asc=D&amp;cdb=AQAY&amp;rn=473930)