text: /**
   * validateExternalDocumentInteractor
   *
   * @param {object} providers the providers object
   * @param {object} providers.applicationContext the application context
   * @param {object} providers.documentMetadata the document metadata
   * @returns {object} errors (null if no errors)
   */
  exports.validateExternalDocumentInteractor = ({
    applicationContext,
    documentMetadata,
  }) => {
    const externalDocument = applicationContext
      .getEntityConstructors()
      .ExternalDocumentFactory.get(documentMetadata);
  
    return externalDocument.getFormattedValidationErrors();
  };
  