word">function</span> (<span class="hljs-params">event</span>)</span>{
  event.preventDefault(); <span class="hljs-comment">// Stops the form from submitting natively</span>
  <span class="hljs-keyword">var</span> validObj = hx.validateForm(<span class="hljs-string">'#form'</span>);
  <span class="hljs-keyword">if</span>(validObj.valid){
    <span class="hljs-comment">// Do something on success</span>
  }
  <span class="hljs-comment">// Do nothing if the form isn't valid (as the validateForm function will s