Unable to conditionally set as required the file upload field