I see, thank you for the clarification. To try to solve the Parsley Validation, maybe we can try below steps:
1. delete all the files from the existing field, in addition to removing the tds inside the tr, you also need to remove the css class of the tr,
$('table.files>tbody>tr').removeClass('file');
Or you can just delete the whole table rows:
$('table.files>tbody>tr').remove();
2. set the file inputs for uploading fields as required, removes the "hasFiles" class for the inputs.
$('input.fileuploader').attr('required', "required");
3. remove the css class from the input:
$('input.fileuploader').removeClass('hasFiles");
To sum up, try:
$(document).ready(function(){
$('table.files>tbody>tr').remove();
$('input.fileuploader').attr('required', "required");
$('input.fileuploader').removeClass('hasFiles");
}
Another option is that you can try to show a loading screen, update the page in the background, and have the delete file clicks trigger occur and when it's done show the form.