title: Using jquery validation plugin to validate multiselect box created using bootstrap multiselect plugin?
body: <p>I am using jquery validation plugin and lately I had to add multi-select dropdown in my form. I used davidstutz bootstrap multiselect plugin. However, could not validate the multiselect box below is my html code , I submit with selecting a value from multiselect box without giving other form inputs even then form gets submitted,</p>
  
  <pre><code>        &lt;select name="franchisee_course" class="multiselect" multiple="multiple"  id="franchisee_course" size="1" placeholder="Courses"&gt;
  
               &lt;?php 
                    foreach($courses as $course) {
                    echo "&lt;option value=".$course['course_id']." &gt;".$course['course_description']."&lt;/option&gt;";
                    }
                ?&gt;
  
        &lt;/select&gt; 
  </code></pre>
  
  <p>and my calling multi-select,</p>
  
  <pre><code>        $('.multiselect').multiselect({
  
            noneSelectedText: 'Select Courses',
            includeSelectAllOption: true,
            enableFiltering: true,
            filterPlaceholder: 'Search course'
  
          });
  </code></pre>
  
  <p>and these are my validation codes for multiselect,</p>
  
  <pre><code>          $.validator.addMethod("needsSelection", function(value, element) {
                 return $(element).multiselect("getChecked").length &gt; 0;
            });
  
            $.validator.messages.needsSelection = 'Select Atleast One Course';
  
  
            franchisee_course: {
  
                  needsSelection: true,
                  required:true
  
  
        },
           ignore: ':hidden:not("#franchisee_course")', // I don't know what this line does
  </code></pre>