title: Mootools Formcheck: Custom Function for Selectbox
body: <p>I have problem with <code>Mootools formcheck</code> js when applying <code>custom function</code> to <code>Selectbox field</code>. <strong>Custom Function</strong> will be work fine with <strong>Text Field</strong>, but <strong>Selectbox</strong> is NOT. </p>
  
  <p>My dummy code of Custom Function:</p>
  
  <pre><code>var customFunc = function customFuncF(el) {
      el.errors.push('Custom function!!!');
      return false;
  };
  </code></pre>
  
  <p>And There are a simple form that I apply to a text field:</p>
  
  <p><img src="https://i.stack.imgur.com/4lQJx.png" alt="enter image description here"></p>
  
  <p>and </p>
  
  <pre><code>&lt;input type="text" class="validate['%customFunc']" id="User_lastName" name="User[lastName]" &gt;
  </code></pre>
  
  <p>-> It works fine with text field. </p>
  
  <p>But when I apply <code>custom function</code> to <code>Selectbox field</code>, example as <code>Office list</code> in my simple form, it's seems not work and always returns <code>true</code>. My example code for Selectbox</p>
  
  <pre><code>&lt;select id="User_officeId" class="validate['%customFunc']" name="User[officeId]" &gt;
      &lt;option selected="selected" value=""&gt;-Select Office-&lt;/option&gt;
      &lt;option value="1"&gt;Office A&lt;/option&gt;
      &lt;option value="2"&gt;Office B&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>How can I apply <code>custom function</code> to <code>Selectbox field</code>? </p>
  
  <p>Thanks,</p>