OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to Validate Select box through Jquery Validator

  • Thread starter Thread starter Tejas Pawar
  • Start date Start date
T

Tejas Pawar

Guest
I have to validate select box through jquery validator.

Code:
<label class="form-label" for="inputState">Status</label>
<select id="inputState" name="status" class="form-control validate[required]">
 <option selected>Choose...</option>
 <option value="1">Active</option>
 <option value="0">Deactive</option>
</select>

Code:
$("#category_validation_form").validate({
            rules: {
                status: {
                    required: true
                }
            }
        });

Any help regarding to this is appreciated

Thanks in advance

<p>I have to validate select box through jquery validator.</p>
<pre><code><label class="form-label" for="inputState">Status</label>
<select id="inputState" name="status" class="form-control validate[required]">
<option selected>Choose...</option>
<option value="1">Active</option>
<option value="0">Deactive</option>
</select>
</code></pre>
<pre><code>$("#category_validation_form").validate({
rules: {
status: {
required: true
}
}
});
</code></pre>
<p>Any help regarding to this is appreciated</p>
<p>Thanks in advance</p>
 
Top