How to create a validation for the Multi-Select field in forms?

OFS Flow Forms and Multi-Select Fields support Field Validation, but there is a little extra complexity when validating a Multi-Select Field.

When using the Alerts Module in Fusion-Manager to create field validation for a multi-select field, your Validation Rules need to reference the Unique Field Name for each Multi-Select Option:

Unique Field Names cannot be dragged and dropped via the usual interface, so we recommend typing the field names into your Validation Formulas.

In the example field we've created here, there are 3 multi-select options:

Within a validation formula, each value can be referenced as:

data["Unique Field Name"]

Where Unique Field Name matches your specific data, per the below example:

data["Yoda"] == "no" || data["Luke Skywalker"] == "no" || data["Gandalf"] == "yes"

These can be built into Validation Rules per the below example:

The rule above invalidates a user's repsonse when they have ticked Gandalf, or left Yoda OR Luke Skywalker unticked.