/** {@inheritDoc} */
    @Override
    protected void onComponentTag(ComponentTag tag) {
      super.onComponentTag(tag);

      if (!isValid()) {
        tag.put("class", "imxt-invalid");
        FeedbackMessage message = getFeedbackMessages().first();
        if (message != null) {
          tag.put("title", message.getMessage().toString());
        }
      }
    }