What are the exact conditions you're looking for?
As far as toggling between required and not required, the following works for my form (mine is based on whether or not any files have been uploaded)
function updateRequiredFields(input, count) {
if(count > 0){
$(field + ' textarea').removeAttr('required');
$(field + ' textarea').attr('class', 'cf-medium user-success');
$(field + ' .ws-errorbox').hide();
$(field + ' .cf-required').hide();
} else {
$(field + ' textarea').attr('required', 'true');
$(field + ' .ws-errorbox').show();
$(field + ' .cf-required').show();
}
}
In this example, my target field is a textarea (multi-line). When a user uploads or removes a file, I call the updateRequiredFields method, and pass it two parameters, the parent element (#q1, #q14, or if you have a custom class assigned to the target you can use that) and the count of how many files are attached.
If there is at least 1 file, it removes the required attribute (NOTE: this is attr, not prop), and I hide the required indicatior; this is important because hiding it means we can just use .show() to bring it back instead of recreating the DOM element.
An easy way to get the uploaded file counts is to count how many "a" elements exist in that field, but that's not the only way.
For example:
$('.RequiredDoc a').length
or
$('.DocUpload a').length
Depend which one is the File Upload element