While doing validation of form fields, I can validating all fields using required attibutes parsley.js. Except the file field. I couldn't able to validate file upload field. When i check the code using developer tool (inspect element) in Firefox there is no classes added for the validation at filed field. Remaining text field, Select fields are having the additional parsley classes.
My HTML Code:
<input type="file" id="uploadDox" name="filename" class="form-control" required>
Parsley form submit JS code:
var form_update = $form_update.parsley();
$btn_form_update.on('click', function(evt) {
evt.preventDefault();
if ( form_update.validate() ) {
loading( $(this), true );
$form_update_trainingDocs.submit();
}
});
what mistake i did there. How can i validate the file field using parsley.js. Please give your suggestion on this.
Thanks in advance :-)