Skip navigation

Validation

Validation messages in tooltips

Switch to simple validation

Add TooltipValidation to any markup container and all validation inside container will look like in examples below. Do not use it with SimpleMessageValidation 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); TooltipValidation validation = new TooltipValidation(); validation.getConfig().appendToParent(true); add(validation); }

Example

Validation for non-ajax forms.

Example

Validation also works with ajax form processing.

Example

Validation in modals.