Panel Validators

Advancing to the next panel during the installation can be controlled using validators.

This can be achieved by a nested <validator> definition in the panel definition in the installer descriptor:

Data Validator Example
    <panel classname="TargetPanel">
      <validator classname="com.izforge.izpack.installer.validator.ConditionValidator"/>

Either Built-in validators or user-defined validators can be used. User-defined validators must in a library specified in a <jar> tag. User defined validators should implement com.izforge.izpack.api.installer.DataValidator.  The validation is done in the validateData method that returns an enum of DataValidator.Status.OK, DataValidator.Status.WARNING, or DataValidator.Status.ERROR.  On an error or warning, the installer will show the message returned by getErrorMessageId or getWarningMessageId, respectively.

There can be any number of validators nested in a <panel> definition. All of the validators must evaluate to true for the final status to be true, 

If any of the unconditioned validators or those that are active by a condition fails the user is prevented from advancing to the next panel using the Next button. Instead, an error or warning message is shown.

The validator determines whether a warning or an error messagebox is shown. It also controls the message translation.

A <validator> tag takes the following attributes:


Fully qualified classname of an validator implementation.

This can be a built-in validator or user-defined .

conditionCondition for applying this validator. If this condition evaluates false, the validator is ignoredStringno

See also