Valid If Rule

   MaestroThe UI design product.  |   Form Builder |  All versions This feature is related to all versions.

Maestro allows you to validate a component's value against an arbitrary condition.

To create a Valid If rule:

  1. Inside the Maestro Editor, select a component from the View pane.
  2. In the Properties pane, click the Create Rule button.
  3. Click the Valid If link, located under the Validation heading.
  4. Define the JavaScript-based logic of the rule within the code editor. As a Validation rule, the Valid If rule should return true to indicate that the component is valid or false to indicate that the component is invalid.
  5. Click Save.

The rule will appear in the Properties pane, under the Rules heading.

Note

You can only attach one rule of each type to a component.

Validation Rules

There are 3 types of validation rules:

For a complete list of rules, refer to List of Maestro Rules.