Validation in Wizards

Backoffice Framework enables validation service in wizards allowing you to verify data that you enter during the creation process.

The validation occurs at three stages in the Configurable Flow Wizard widget:
  • initial validation

  • after-typing validation

  • on-navigation validation

Enabling Validation in Wizards

In the Configurable Flow Wizard widget, the validation engine performs the checks on the properties defined in the cockpit configuration for the Save attribute, or collected from Initialize section when you use the Save-all attribute. When there is an Error or a Warning, you cannot save the object. The validation result popup appears and lists all validation violations (Infos/Warnings/Errors).

Initial validation: the engine runs it against the current, not yet persisted object.

For instance, when you want to create a Product, you trigger the creation wizard, the wizard shows the initial validation errors:

Initial validation shows error as there is StringNotBlank constraint for the Article Number enabled.

After-typing validation: The engine runs it after you edit an editor field. If the validation engine finds any violation, it marks the editor with the incorrect value with the icon and color respective to the severity, like in the Editor Area:

After you type in the Article Number field, the validation engine shows a Warning as there is a Size constraint enabled.

Click the severity icon to see the validation detailed error message popup.

On-navigation validation: The engine fires the validation when you click a navigation button in the wizard. When you click a particular validation error in the result popup, the mechanism takes you to the editor that contains the reported violation, even when the editor is in a different step. If there are only errors of Info and Warning type violations, after clicking a navigation button, you see the Confirm & Next button. You can navigate to the next step after you approve the error: