code: public void showErrors(final Set<String> messages) {
      final InputElement inputElement = this.getInputElement();
      if (messages.isEmpty()) {
        if (FeatureCheck.supportCustomValidity(inputElement)) {
          inputElement.setCustomValidity(StringUtils.EMPTY);
        }
        if (this.validationMessageElement == null) {
          inputElement.setTitle(StringUtils.EMPTY);
        } else {
          this.validationMessageElement.getElement().removeAllChildren();
        }
      } else {
        final String messagesAsString = ErrorMessageFormater.messagesToString(messages);
        if (FeatureCheck.supportCustomValidity(inputElement)) {
          inputElement.setCustomValidity(messagesAsString);
        }
        if (this.validationMessageElement == null) {
          inputElement.setTitle(messagesAsString);
        } else {
          this.validationMessageElement.getElement()
              .setInnerSafeHtml(ErrorMessageFormater.messagesToList(messages));
        }
      }
    }
docs: show error messages.
  
  @param messages set of messages