title: HTML input pattern not working validation
body: <p>I have very strange issue. </p>
  
  <p>in a very sample search form with one input field:</p>
  
  <pre class="lang-html prettyprint-override"><code> &lt;input pattern="\S.{3,}"  name="text"/&gt;
  </code></pre>
  
  <p>The validation fails for value <pre>     dds sdsd</pre>, but JS says it's Ok.</p>
  
  <pre class="lang-js prettyprint-override"><code>/\S.{3,}/.test('     dds sdsd')
  true
  /\S.{3,}/.test('    ')
  false
  </code></pre>
  
  <p>Maybe I am missing something small or pattern is wrong, but according to regex.com it should be valid.<br>
  The idea is to prevent submit empty spaces. I am searching for a solution without write JS code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form method="GET" action="/"&gt;
  &lt;input class="form-control" name="text" type="text" pattern="\S.{3,}"  /&gt;
  &lt;input type="submit" value="search" &gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>