Add SimpleMessageValidation to any markup container and all validation inside container will look like in examples below. Do not use it with TooltipValidation on one page.
This behavior may not work properly with widgets like bootstrap-select or select2. In this case try to wrap all input fields in div (that's done by default in bootstrap form layout) and set appendToParent of config to true.
public MyWebPage(PageParameters parameters) {
super(parameters);
SimpleMessageValidation validation = new SimpleMessageValidation();
add(validation);
}
Validation for non-ajax forms.
Validation also works with ajax form processing.
Validation in modals.