1

I have a web form and using jquery validation , there are more then one select on the page .i am facing bit awkward issue one of my select is getting validate and another select is not .

my web form code :

 <select id="C^4_DRP" class="form-control required">
            <option value="">Select </option>


                <option value="5 Days">5 Days  </option>
                <option value="9 Days">9 Days  </option>
                <option value="16 Days">16 Days  </option>
                <option value="22 Days">22 Days  </option>
                <option value="30 Days">30 Days  </option>
                <option value="45 Days">45 Days  </option>
                <option value="60 Days">60 Days  </option>
                <option value="75 Days">75 Days  </option>
                <option value="90 Days">90 Days  </option>
                <option value="Annual">Annual  </option>
        </select>


<br/>
<select id="C^6_DRP" class="form-control required">
            <option value="">Select </option>


                <option value="Worldwide excluding USA/Canada">Worldwide excluding USA/Canada   </option>
                <option value="Worldwide including USA/Canada">Worldwide including USA/Canada  </option>
                <option value="Middle East">Middle East, North Africa  </option>
        </select>

I think my issue might be of an id of these select .which contains special character and not able to find by jquery.validate.js. but then why its working on first select and when my cursor goes on second select its gets start working (Just showing the error not actually validating).

Jquery fiddle link of my problem is : Fiddle link of my problem

1 Answer 1

1

you have not given name attribute,check this fiddle

Validation work on name attribute

<select id="C^4_DRP"  name="C^4_DRP" class="form-control required">
    <option value="">Select</option>
    <option value="5 Days">5 Days</option>
    <option value="9 Days">9 Days</option>
    <option value="16 Days">16 Days</option>
    <option value="22 Days">22 Days</option>
    <option value="30 Days">30 Days</option>
    <option value="45 Days">45 Days</option>
    <option value="60 Days">60 Days</option>
    <option value="75 Days">75 Days</option>
    <option value="90 Days">90 Days</option>
    <option value="Annual">Annual</option>
</select>
<br/>
<select id="C^6_DRP" name="C^6_DRP" class="form-control required">
    <option value="">Select</option>
    <option value="Worldwide excluding USA/Canada">Worldwide excluding USA/Canada</option>
    <option value="Worldwide including USA/Canada">Worldwide including USA/Canada</option>
    <option value="Middle East">Middle East, North Africa</option>
</select>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.