docs: private CmsValidationResult validateContent(
          CmsObject cms,
          CmsUUID structureId,
          CmsXmlContent content,
          Set<String> fieldNames) {
  
          CmsXmlContentErrorHandler errorHandler = content.validate(cms);
          Map<String, Map<String[], String>> errorsByEntity = new HashMap<String, Map<String[], String>>();
  
          if (errorHandler.hasErrors()) {
              boolean reallyHasErrors = false;
              for (Entry<Locale, Map<String, String>> localeEntry : errorHandler.getErrors().entrySet()) {
                  Map<String[], String> errors = new HashMap<String[], String>();
                  for (Entry<String, String> error : localeEntry.getValue().entrySet()) {
                      I_CmsXmlContentValue value = content.getValue(error.getKey(), localeEntry.getKey());
                      if ((fieldNames == null) || fieldNames.contains(value.getPath())) {
                          errors.put(getPathElements(content, value), error.getValue());
                          reallyHasErrors = true;
                      }
  
                  }
                  if (reallyHasErrors) {
                      errorsByEntity.put(
                          CmsContentDefinition.uuidToEntityId(structureId, localeEntry.getKey().toString()),
                          errors);
                  }
              }
          }
          Map<String, Map<String[], String>> warningsByEntity = new HashMap<String, Map<String[], String>>();
          if (errorHandler.hasWarnings()) {
              boolean reallyHasErrors = false;
              for (Entry<Locale, Map<String, String>> localeEntry : errorHandler.getWarnings().entrySet()) {
                  Map<String[], String> warnings = new HashMap<String[], String>();
                  for (Entry<String, String> warning : localeEntry.getValue().entrySet()) {
                      I_CmsXmlContentValue value = content.getValue(warning.getKey(), localeEntry.getKey());
                      if ((fieldNames == null) || fieldNames.contains(value.getPath())) {
                          warnings.put(getPathElements(content, value), warning.getValue());
                          reallyHasErrors = true;
                      }
                  }
                  if (reallyHasErrors) {
                      warningsByEntity.put(
                          CmsContentDefinition.uuidToEntityId(structureId, localeEntry.getKey().toString()),
                          warnings);
                  }
              }
          }
          return new CmsValidationResult(errorsByEntity, warningsByEntity);
      }