title: HTML simple not blank pattern
body: <p>I have a simple form and i want the submit button not to work for the conditions i give in the pattern, but if i leave it blank the submit works. how can i make the pattern not to accept it if it is blank?</p>
  
  <pre><code>&lt;form action="test.php" method="POST"&gt;
  Enter user name: 
  &lt;input type="text" name="username" pattern="[A-Za-z0-9]{1,20}"&gt;
  &lt;input type="submit" value="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I thought the {1,20} is enought but it seems it's not.</p>