performance - Enable files extensions with jQuery validate -
the code works half well, can not check file extensions. how enable feature when user types in wrong file formats displays error message?
$(document).ready(function () { jquery.validator.setdefaults({ success : "valid" }); var validator = $("#myform").validate({ rules : { "file1" : { required : true, extension : "slx|mdl", accept : false }, "file2" : { extension : "m", accept : false }, "file3" : { extension : "xlsx|xls", accept : false }, "file4" : { extension : "pdf", accept : false } } }); });
Comments
Post a Comment