To validate the form using the JQuery Validation Plugin , it works for all fields except the <input type="file" id="ProjectInformation">
. For which I check the validity of the extensions of the downloaded file
<script> $(function() { $("#feedback-form").validate({ submitHandler: function(form) { form.submit(); }, rules: { Name: { required: true, minlength: 2 }, ProjectInformation: { extension: "doc|txt|pdf", } }, messages: { Name: { required: "Please enter a name", minlength: "Name must consist of at least 2 characters" }, ProjectInformation: { extension: "Only .doc, .txt, and .pdf files allowed", } } }); }); </script>
I get an error
Uncaught TypeError: Cannot call method 'call' of undefined
Jquery.validate.js plugin : 572
If I try to send an empty form, and the same error in several places in gkfubyf, if I upload a <input type=“file”>
to <input type=“file”>
.