I'm looking to use Foundation's Abide plug-in to validate the type of file extension uploaded into a type="file" input tag, but I'm having troubles validating the check against the RegExp correctly.
html:
<div class="large-2 columns button">
<input id="uploadResume" type="file" required pattern="resume" />
<small class="error">PDF or Word Document only please</small>
</div>
javascript:
$(document)
.foundation().foundation('abide', {
patterns: {
// check if the last 3 letters are acceptable
resume: /^.(doc|DOC|pdf|PDF)*$/
}
});