title: Special Characters Validation
body: <p>I have a JQuery code like this:</p>
  
  <pre><code>// Validation to avoid non alphanumeric characters from being typed
  function alphanumeric(eventSource) {
      var numaric = eventSource.val();
      for (var j = 0; j &lt; numaric.length; j++) {
          var alphaa = numaric.charAt(j);
          var hh = alphaa.charCodeAt(0);
          // If the value contains non alphanumeric characters
          if (!((hh &gt; 47 &amp;&amp; hh &lt; 58) || (hh &gt; 64 &amp;&amp; hh &lt; 91) || (hh &gt; 96 &amp;&amp; hh &lt; 123))) {
              eventSource.val(numaric.substring(0, j) + numaric.substring(j + 1,  numaric.length));
          }
      }
  }
  </code></pre>
  
  <p>I am trying to validate the special characters of a text box input.
  But somehow, it also validates the space (space bar on keyboard), which the char code is 32.
  Advice please, thanks.</p>