I managed to get parsleyjs.org validate a "required" Chosen dropdown but I can't seem to be able to validate the Multi selection dropdown.
I have tried to apply the max and min validation rules, that did not work.
I have setup parsleyjs.org and Choosen on a test site here: http://loai.directory/test/test/blank.php
How can I validate min and max on a multi selection dropdwon with parsleyjs?
You should use data-parsley-mincheck
for that. The following example works as expected (jsfiddle demo).
<form id="myForm">
<select name="[]" multiple="multiple" data-parsley-required data-parsley-mincheck="2">
<optgroup label="Section">
<option>Drop Down Option A</option>
<option>Drop Down Option B</option>
</optgroup>
<optgroup label="Section">
<option>Drop Down Option A</option>
<option>Drop Down Option B</option>
</optgroup>
</select>
<input type="submit" />
</form>
<script>
$(document).ready(function() {
$("select").chosen();
$("#myForm").parsley();
});
</script>