using jquery validate accept methods with ie - any pollyfills
so the jQuery validate has an extra plugin called accept
http://jqueryvalidation.org/accept-method
what this allows you to do is validate file types on an upload form for
example
so you could have a bit of code that looks like
$("#addNewDocumentForm").validate({
rules: {
inputDocument: { required: true, accept: "png|jpe?g|gif|pdf" }
},
messages: {
inputDocument: "File must be PDF, DOCX, JPG, GIF or PNG"
},
submitHandler: function(e) {
...
the problem is using this in ie 8 or 9 because while it will do the
required part it will not do the accept bit as it uses the file API part
of HTML5
I was wondering if anyone has come across any similar issues? any if they
found any polyfills for it etc?
can anyone help / suggest anything
thanks
No comments:
Post a Comment