How to remove the validation of State/Province from one page Magento checkout?

How to remove the validation of State/Province from one page Magento checkout?

July 13, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How to remove the validation of State/Province from one page Magento checkout?

Removing State/Province Validation from One Page Magento Checkout

One of the most common challenges faced by Magento developers is customizing the checkout process, especially when it comes to removing or modifying default validation rules. In your case, you want to eliminate the state/province field validation during the one-page checkout process.

The Challenge: Default Magento Behavior

By default, Magento requires users to select a state or province from the dropdown menu during the billing address step of the checkout process. The form is validated to ensure this field is populated before proceeding to the next stage.

This behavior is hardcoded into the Magento core files, making it difficult to modify directly without creating potential security risks and compatibility issues with future updates.

The Solution: Override the Checkout Form

To achieve your goal of removing state/province validation, you’ll need to override the default one-step checkout form. This involves creating a custom theme layout file that replaces the core template.

Here’s a step-by-step guide:

  1. Create a Custom Theme Layout File

Navigate to your Magento theme directory (usually app/design/frontend/<Vendor>/<Theme>). Create a new folder named Magento_Checkout if it doesn’t exist, then inside this folder, create another folder named layout. Inside the layout folder, you should now have the following structure:

- app/design/frontend/<Vendor>/<Theme>
  - Magento_Checkout
    - layout
      - checkout_index_index.xml
  1. Modify the Checkout Form

Open the checkout_index_index.xml file (create it if doesn’t exist). Add or modify the content as follows:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="template" translate="false">Magento_Checkout/default/templates/onepage/billing-address.phtml</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>
  1. Customize the Billing Address Template

Now, navigate to app/design/frontend/<Vendor>/<Theme> and create a new folder named template. Inside this folder, look for or create the following path:

- app/design/frontend/<Vendor>/<Theme>
  - template
    - Magento_Checkout
      - onepage
        - billing-address.phtml

Open the billing-address.phtml file and locate the state/province input field. You should see something similar to your provided code snippet.

  1. Remove or Comment Out the State/Province Input Field

To remove the validation, you can either delete the entire div containing the state/province field or comment it out. Here’s how:

<!--
<div class="field">
    <label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
    <div class="input-box">
        <input type="text" title="<?php echo $this->__('state') ?>" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" class="input-text stat<?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" id="billing:region" />
    </div>
</div>
-->

If you comment out the div, Magento will no longer validate this field. Remember to remove the opening and closing comments if you want to re-enable validation later.

Conclusion

Removing state/province validation from the one-page checkout process in Magento requires a deep understanding of theme layouts and template overriding. By following the steps outlined above, you can successfully customize your checkout experience without altering core files or risking compatibility issues.

Remember to backup your original files before making any changes, as customizations may need to be reapplied after platform updates.

For more advanced customization tips and best practices in Magento development, feel free to explore our comprehensive resources at Laravel Company.

Checkout Security Themes Errors

Our network