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

Prince picture Prince · Apr 2, 2015 · Viewed 7.9k times · Source

I want to remove the validation of state/province from billing information process bar in one page checkout page.

I tried but unable to do that. Please check the code:

<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>

Answer

Ian Phillips picture Ian Phillips · May 5, 2015

Try this:

Go to your admin panel -> System -> Configuration -> General -> States Options -> "State is required for"

and then de-select any countries for which you do not want a state to be required.

(Set "Display not required State" to "no" if you want to hide the state input entirely for countries that do not require it.)