We need you!


The IzPack documentation needs work, and you are invited to edit it!

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


You can implement your own custom Validator implementation simply by creating a new class which implements the com.izforge.izpack.panels.Validator interface. This interface specifies a single method: validate(ProcessingClient) , which returns a boolean value. You can retrieve the value entered by the user by casting the input ProcessingClient for example in the RuleInputField and call the RuleInputField.getText() method. You can also retrieve any parameters to your custom Validator by calling theRuleInputField.getValidatorParams() which returns a java.util.Map object containing parameter names mapped to parameter values. For an example, take a look at com.izforge.izpack.util.RegularExpressionValidator.

Set values in the RuleInputField can be preprocessed. At now you can specify a processor class to pre process a value to be set at initial value of a RuleInputField. Syntax:

<spec set="0:defaultVal:classname" .../>

The class name is an optional value. The class must implement the Processor interface.