Possible Duplicate:
Limit file format when using <input type=“file”>?
I need to use the HTML5 pattern
attribute to only allow JPG, GIF and PNG files in a <input type="file">
element.
I currently have this pattern, but it is not working:
<input type="file" class="input-file" id="tbinstUploadFile0" name="tbinstUploadFile0" placeholder="Please insert an image file..." pattern="([^\s]+(\.(?i)(jpg|png|gif|bmp))$)">
This regex pattern is not compatible with HTML5? How can I test for valid HTML5 regex patterns?