Se preferir usar jQuery:</1>
jQuery.validator.setDefaults({
debug: true,
success: "valid"
});
$("#myform").validate({
rules: {
field: {
required: true,
extension: "csv"
}
}
});
<script src="http://jqueryvalidation.org/files/dist/additional-methods.min.js"></script>
<script src="http://jqueryvalidation.org/files/dist/jquery.validate.min.js"></script>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<form id="myform">
<label for="field">Apenas arquivos no formato .csv</label>
<input type="file" class="left" id="field" name="field">
<br/>
<input type="submit" value="Validate!">
</form>