title: Alpha-only character validation in JavaScript
body: <p>I am working on this code in which it checks validation on numeric characters. In the same way, I want validation on alpha-only characters. I have tried many symbols but failed to succeed.</p>
  
  <pre><code>if (/\D/.test(x))
  {
    alert("Please only enter numeric characters  (Allowed input:0-9)")
    return false;
  }
  </code></pre>
  
  <p>What changes are required in this code for alpha-only validation.</p>