code: @Override
      public void validate(ValidationHelper helper, Context context, String key, Example t) {
  
          if (t != null) {
              String reference = t.getRef();
  
              if (reference != null && !reference.isEmpty()) {
                  ValidatorUtils.referenceValidatorHelper(reference, t, helper, context, key);
                  return;
              }
  
              // The value field and externalValue fields are mutually exclusive.
              if (t.getValue() != null && (t.getExternalValue() != null && !t.getExternalValue().isEmpty())) {
                  final String message = Tr.formatMessage(tc, "exampleOnlyValueOrExternalValue", key);
                  helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.WARNING, context.getLocation(), message));
              }
          }
      }
docs: {@inheritDoc}