docs: public void attachFormValidator(final Form<?> form, final FormValidator validator) {
          form.add(new AbstractFormValidator() {
  
              private static final long serialVersionUID = -4181095793820830517L;
  
              @Override
              public void validate(Form<?> form) {
                  Map<String, FormComponent<?>> loadFormComponents = loadFormComponents(form);
                  Map<String, String> toValidate = new HashMap<String, String>();
                  for (Map.Entry<String, FormComponent<?>> entry : loadFormComponents.entrySet()) {
                      toValidate.put(entry.getKey(), entry.getValue().getValue());
                  }
                  try {
                      validator.validate(toValidate);
                  } catch (ConnectorValidationFailedException e) {
                      Map<String, String> attributeErrorMessages = e.getErrorMessages();
                      for (Map.Entry<String, String> entry : attributeErrorMessages.entrySet()) {
                          FormComponent<?> fc = loadFormComponents.get(entry.getKey());
                          fc.error(new ValidationError().setMessage(entry.getValue()));
                      }
                  }
  
              }
  
              @Override
              public FormComponent<?>[] getDependentFormComponents() {
                  Collection<FormComponent<?>> formComponents = loadFormComponents(form).values();
                  return formComponents.toArray(new FormComponent<?>[formComponents.size()]);
              }
  
              private Map<String, FormComponent<?>> loadFormComponents(final Form<?> form) {
                  Map<String, FormComponent<?>> formComponents = new HashMap<String, FormComponent<?>>();
                  if (validator != null) {
                      for (String attribute : validator.fieldsToValidate()) {
                          Component component =
                              form.get("attributesPanel:fields:" + attribute + ":row:field");
                          if (component instanceof FormComponent<?>) {
                              formComponents.put(attribute, (FormComponent<?>) component);
                          }
                      }
                  }
                  return formComponents;
              }
          });
      }