export const validationUploads = (
  _: any,
  fileList: any,
  validation: any,
): Promise<void> => {
  if (fileList.key && _.field === 'certificate' && !fileList.certificate) {
    return Promise.reject(new Error(validation.needUploadCert));
  }
  if (!fileList.key && _.field === 'key' && fileList.certificate) {
    return Promise.reject(new Error(validation.needUploadKey));
  }
  return Promise.resolve();
};
