im uploading an image and trying to validate it before with jquery. Here is my code:
1) As already stated, you need to include the additional-methods.js file.
2) For file extensions, use the extension rule. The accept rule is for mime types.
$(document).ready(function(){
$("#form").validate({
errorLabelContainer: "#message_box", wrapper: "li",
rules: {
image: {
required: true,
extension: "jpg|jpeg|png|gif"
}
},
...
})
});