title: maximumSelectionSize isn't working in Select2
body: <p>I have a multivalue select, and I want to set the restriction on number of selected items using the <code>select2</code> library.</p>
  <p><a href="http://select2.github.io/select2/#maximumSelectionSize" rel="noreferrer">Documentation</a> says that I should set <code>maximumSelectionSize</code> during the object initialization. Unfortunately, the following code doesn't work:</p>
  <pre><code>$(document).ready(function () {
      $(&quot;#select_demo&quot;).select2({
          maximumSelectionSize: 3
      });
  });
  </code></pre>
  <p>My html selectbox:</p>
  <pre><code>&lt;div class=&quot;form-group&quot;&gt;
      &lt;select id=&quot;select_demo&quot; multiple=&quot;multiple&quot; class=&quot;form-control select2 select2-container-multi&quot;&gt;
          &lt;optgroup label=&quot;One&quot;&gt;
              &lt;option&gt;one&lt;/option&gt;
              &lt;option&gt;two&lt;/option&gt;
              &lt;option&gt;three&lt;/option&gt;
              &lt;option&gt;four&lt;/option&gt;
          &lt;/optgroup&gt;
          &lt;optgroup label=&quot;Two&quot;&gt;
              &lt;option&gt;one2&lt;/option&gt;
              &lt;option&gt;two2&lt;/option&gt;
          &lt;/optgroup&gt;
          &lt;optgroup label=&quot;Three&quot;&gt;
              &lt;option&gt;one3&lt;/option&gt;
              &lt;option&gt;two3&lt;/option&gt;
              &lt;option&gt;three3&lt;/option&gt;
              &lt;option&gt;four3&lt;/option&gt;
          &lt;/optgroup&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  <p><a href="http://jsfiddle.net/x4oqL1jr/2/" rel="noreferrer">http://jsfiddle.net/x4oqL1jr/2/</a></p>
  <p>What is wrong with this chunk of code?</p>