mercredi 15 avril 2015

Validate a disabled select2 field with jquery validate


Vote count:

0




In my project I use jquery validate plugin for validate my form. In this form for the select elements I use select2 plugin. Now I tried to validate a disabled select2 field but with no success.


HTML



<select name="number" disabled>
<option value="1">1</option>
<option value="2">2</option>
</select>


JS



$('select').select2({
allowClear: true
});

$("#form").validate({
ignore: '',
rules: {
number: { required: true }
}
});


How would I do that? thanks



asked 1 min ago







Validate a disabled select2 field with jquery validate

Aucun commentaire:

Enregistrer un commentaire