Validating file input array by using jquery validator

Validating file input array by using jquery validator

How to validate file input array
 by using following code

<td><input id="idprof" name="idprof[]" class="idprof" type="file"></td>


var v= $('#docs_upload').validate({
        errorPlacement: $.noop,
   
        rules: {  
       
        },
      
        invalidHandler: function(form, validator) {
            var errors = validator.numberOfInvalids();
            if (errors) {                   
                validator.errorList[0].element.focus();
                $("span").html(errorList[0].message);
            }
            $('.doccat').each(function () {
                if($(this).val() == "" && $(this).val().length < 1) {
                    $(this).addClass('error');
                } else {
                    $(this).removeClass('error');
                }
            });   
            $('.docnm').each(function () {
                if($(this).val() == "" && $(this).val().length < 1) {
                    $(this).addClass('error');
                } else {
                    $(this).removeClass('error');
                }
            });
           
         
        },

        submitHandler:function(form) {
            var isValid = true;
            $('.doccat').each(function () {
                if($(this).val() == "" && $(this).val().length < 1) {
                    $(this).addClass('error');
                    isValid = false;
                } else {
                    $(this).removeClass('error');
                }
            });       
            $('.docnm').each(function () {
                if($(this).val() == "" && $(this).val().length < 1) {
                    $(this).addClass('error');
                    isValid = false;
                } else {
                    $(this).removeClass('error');
                }
            }); 
           
            if(isValid) {
                form.submit();
            }
            else
            {
                $(".alert-danger span").html('Field in red must not be blank');
            }
           
        }
    });