docs: protected ValidationResult validate(T theRequest, RequestDetails theRequestDetails) {
  		FhirValidator validator = theRequestDetails.getServer().getFhirContext().newValidator();
  		if (myValidatorModules != null) {
  			for (IValidatorModule next : myValidatorModules) {
  				validator.registerValidatorModule(next);
  			}
  		}
  
  		if (theRequest == null) {
  			return null;
  		}
  
  		ValidationResult validationResult;
  		try {
  			validationResult = doValidate(validator, theRequest);
  		} catch (Exception e) {
  			if (myIgnoreValidatorExceptions) {
  				ourLog.warn("Validator threw an exception during validation", e);
  				return null;
  			}
  			if (e instanceof BaseServerResponseException) {
  				throw (BaseServerResponseException)e;
  			}
  			throw new InternalErrorException(e);
  		}
  
  		if (myAddResponseIssueHeaderOnSeverity != null) {
  			boolean found = false;
  			for (SingleValidationMessage next : validationResult.getMessages()) {
  				if (next.getSeverity().ordinal() >= myAddResponseIssueHeaderOnSeverity) {
  					addResponseIssueHeader(theRequestDetails, next);
  					found = true;
  				}
  			}
  			if (!found) {
  				if (isNotBlank(myResponseIssueHeaderValueNoIssues)) {
  					theRequestDetails.getResponse().addHeader(myResponseIssueHeaderName, myResponseIssueHeaderValueNoIssues);
  				}
  			}
  		}
  
  		if (myFailOnSeverity != null) {
  			for (SingleValidationMessage next : validationResult.getMessages()) {
  				if (next.getSeverity().ordinal() >= myFailOnSeverity) {
  					postProcessResultOnFailure(theRequestDetails, validationResult);
  					fail(theRequestDetails, validationResult);
  					return validationResult;
  				}
  			}
  		}
  
  		if (myAddResponseOutcomeHeaderOnSeverity != null) {
  			IBaseOperationOutcome outcome = null;
  			for (SingleValidationMessage next : validationResult.getMessages()) {
  				if (next.getSeverity().ordinal() >= myAddResponseOutcomeHeaderOnSeverity) {
  					outcome = validationResult.toOperationOutcome();
  					break;
  				}
  			}
  			if (outcome == null && myAddResponseOutcomeHeaderOnSeverity != null && myAddResponseOutcomeHeaderOnSeverity == ResultSeverityEnum.INFORMATION.ordinal()) {
  				FhirContext ctx = theRequestDetails.getServer().getFhirContext();
  				outcome = OperationOutcomeUtil.newInstance(ctx);
  				OperationOutcomeUtil.addIssue(ctx, outcome, "information", "No issues detected", "", "informational");
  			}
  
  			if (outcome != null) {
  				IParser parser = theRequestDetails.getServer().getFhirContext().newJsonParser().setPrettyPrint(false);
  				String encoded = parser.encodeResourceToString(outcome);
  				if (encoded.length() > getMaximumHeaderLength()) {
  					encoded = encoded.substring(0, getMaximumHeaderLength() - 3) + "...";
  				}
  				theRequestDetails.getResponse().addHeader(myResponseOutcomeHeaderName, encoded);
  			}
  		}
  
  		postProcessResult(theRequestDetails, validationResult);
  		
  		return validationResult;
  	}