title: form does not submit and the validation not working
body: <p>i am new to javascript , i have created a registration form but it does not submits and the validation is not working . i could not know what is wrong in the code .
  the validation function is to check whether the input contains only alphabets</p>
  
  <p><strong>file.html</strong>
  </p>
  
  <pre><code>      &lt;!DOCTYPE html&gt;
      &lt;html&gt;
      &lt;head&gt;
       &lt;title&gt;&lt;/title&gt;
       &lt;link rel="stylesheet" type="text/css" href="css/inscrption_form.css"&gt;
       &lt;link href="https://fonts.googleapis.com/css?family=Josefin+Sans&amp;display=swap" rel="stylesheet"&gt;
          &lt;link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"&gt;
         &lt;script  type="text/javascript"src="/js/script.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;header&gt;
       &lt;div class="mainheader"&gt;
        &lt;div class="logo"&gt;
          &lt;h2&gt; A &lt;/h2&gt;
    &lt;/div&gt;
   &lt;/div&gt;
  &lt;/header&gt;
  
  
      &lt;form id="forme" onsubmit="return valider()"&gt;
          &lt;table&gt;
              &lt;tr&gt;
           &lt;td colspan="2" align="center"&gt;
                   &lt;h1&gt; Form &lt;/h1&gt;
               &lt;/tr&gt;
          &lt;tr&gt;.. &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;*Nom&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" placeholder = "Sara" id = "nom"maxlength="25"  required&gt;&lt;/td&gt;
              &lt;small id="error2"&gt;errr &lt;/small&gt;
          &lt;/tr&gt;
         &lt;tr&gt;.. &lt;/tr&gt;
          &lt;tr&gt;.. &lt;/tr&gt;
         &lt;tr&gt;.. &lt;/tr&gt;
           &lt;tr&gt;.. &lt;/tr&gt;
         &lt;tr&gt;.. &lt;/tr&gt;
          &lt;tr&gt;    
              &lt;td colspan="2" align="center"&gt;
                  &lt;button type="submit"  value="Envoyer"&gt;sign up &lt;/button&gt;
  
                  &lt;button type="reset"  value="Annuler"&gt;Annuler&lt;/button&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;/table&gt;
       &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>script.js</strong></p>
  
  <pre><code>    function valider()
  {
      // nom test 
      var input = document.getElementById('nom');
      var alphabets = /^[A-Za-z]+$/ ;
      if(input.value.match(alphabets))
        { 
          return true ;
      }else{
       document.getElementById('error2').innerText ="only alphabets  "   
          return false ;
      }
  }
  </code></pre>