title: How to validade in HTML5 to only allow in 'input type="file"' JPG, GIF or PNG?
body: <blockquote>
  <p><strong>Possible Duplicate:</strong><br />
  <a href="https://stackoverflow.com/questions/4328947/limit-file-format-when-using-input-type-file">Limit file format when using &lt;input type=“file”&gt;?</a></p>
  </blockquote>
  
  <p>I need to use the HTML5 <code>pattern</code> attribute to only allow JPG, GIF and PNG files in a <code>&lt;input type=&quot;file&quot;&gt;</code> element.</p>
  <p>I currently have this pattern, but it is not working:</p>
  <pre><code>&lt;input type=&quot;file&quot; class=&quot;input-file&quot; id=&quot;tbinstUploadFile0&quot; name=&quot;tbinstUploadFile0&quot; placeholder=&quot;Please insert an image file...&quot; pattern=&quot;([^\s]+(\.(?i)(jpg|png|gif|bmp))$)&quot;&gt;
  </code></pre>
  <p>This regex pattern is not compatible with HTML5? How can I test for valid HTML5 regex patterns?</p>