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

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -