- [Home page](https://www.brimit.com/)
- [Blog](https://www.brimit.com/blog)

# Sitecore Commerce 9: How to Disable Address Validation for State/Country

[#How-to](https://www.brimit.com/blog?categories=#How-to) [DXP](https://www.brimit.com/blog?platforms=DXP)
[Andrei Paliakou](https://www.brimit.com/blog/author?authors=Andrei%20Paliakou) on November 28, 2019

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&iar=0&w=360&hash=5BE96F17AE5B47F66D9F684B87773675)

Andrei Paliakou

Sitecore MVP/ Lead Developer
[Andrei Paliakou](https://www.brimit.com/blog/author?authors=Andrei%20Paliakou)

###### More By Categories

[#Events](https://www.brimit.com/blog?categories=#Events) [#How-to](https://www.brimit.com/blog?categories=#How-to) [#News](https://www.brimit.com/blog?categories=#News) [#Guides](https://www.brimit.com/blog?categories=#Guides)

###### More by Platform

[Data and AI](https://www.brimit.com/blog?platforms=Data%20and%20AI) [DXP](https://www.brimit.com/blog?platforms=DXP) [E-commerce](https://www.brimit.com/blog?platforms=E-commerce) [Internet of Things](https://www.brimit.com/blog?platforms=Internet%20of%20Things) [Sales and marketing automation](https://www.brimit.com/blog?platforms=Sales%20and%20marketing%20automation)

#### 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-to DXP E-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
[How Vercel Will Help You Save Effort When Deploying Sophisticated Sitecore Projects](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-to DXP

##### 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
[Training Up Tomorrow's Sitecore MVPs: a Mentoring Success Story](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-to DXP E-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
[Going Headless. Part 2: When a Headless CMS Is Your Best Bet (if you have Sitecore)](https://www.brimit.com/blog/going-headless-part-2-when-a-headless-cms-is-your-best-bet-if-you-have-sitecore)
