title: Validate the field so that it does not accept spaces and special characters
body: <p>I have a field for a form where the user cannot put spaces and special characters. How can I do this validation with Jquery?</p>
  <pre><code>&lt;label for=&quot;ref&quot;&gt;Reference&lt;/label&gt;
  &lt;input class=&quot;btn btn-primary&quot; id=&quot;ref&quot; name=&quot;Reference&quot;&gt; 
  </code></pre>