Validation in Editor Area

Backoffice Framework enables validation service in the Editor Area.

There are three typical scenarios for validation in Editor Area widget:

  • initial validation
  • after-typing validation
  • on-save validation

Initial validation: Engine runs it on the object load. Whenever you load an object in the Editor Area, the system performs validation of all its values against their declared constraints. If there are any violations, it colors the respective editors and adds a proper violation icon by the attribute name (see after-typing validation).

After-typing validation: Engine runs it on the recently updated editor field. If the validation engine finds any violation after you type in a value, it marks the editor with the incorrect value with an icon and color respective to the severity:

  • Red for Error

  • Yellow for Warning

  • Blue for Info

Click the severity icon to see the detailed information of the validation violation.

On-save validation: Engine runs it when you click Save button. The system validates all the editor values against the constraint rules and marks the erroneous ones with a relevant status. Additionally, when there is at least one validation violation, the result window appears.

Click any of the violations presented in the pop-up to change focus to the relevant editor. When you select a particular violation, the system searches for the editor associated with the attribute that contains an incorrect value. Automatically, it selects the appropriate tab and scrolls the view to this editor. You also see a hint with the violation message.

If there is no violation, the system successfully saves the object.

If all violations are of Info severity, you can still save the object. All editors associated with the violated attributes are marked with appropriate color and severity level icons. You also see the validation result window on the right-hand side.

If all violations are either Warnings or Info (but there is at least one Warning), you can still save the object, but only after you approve the error. All editors associated with violated attributes are marked with the appropriate color and severity level icons. Additionally, you see the validation result window with Ignore & Save option. When you click the Ignore & Save button, you trigger the validation again. If there are no new violations, the object is saved.

If there is at least one Error violation, you cannot save the object. All editors associated with the violated attributes are marked with the appropriate color and severity level icons. You also see the validation result window.

You are always able to see the currently present violations in the Editor Area. It means that on the object load, the validation engine performs the checks and marks the invalid editors accordingly. The errors stay highlighted until you correct the wrong values.

For more information, see the Editor Area Widget.