Rules & references

A rule reads a field and acts on the field that owns it.

JSON
{
  "type": "text",
  "key": "note",
  "rules": [
    {
      "when": {
        "property": "includeNote",
        "operation": "Eq",
        "value": true
      },
      "then": [
        {
          "kind": "set_hidden",
          "hidden": false
        }
      ]
    },
    {
      "when": {
        "property": "includeNote",
        "operation": "Eq",
        "value": false
      },
      "then": [
        {
          "kind": "set_hidden",
          "hidden": true
        }
      ]
    }
  ]
}

Conditions

When contains property, operation and value. Use a scalar literal or { "ref": "otherField" } as the operand. Both references must resolve to fields with compatible comparison domains.

Text and email share a string domain; numbers use number, booleans use boolean. Eq, Neq, Lt, Gt, LEqt and GEqt are supported by string/number fields. Booleans support Eq and Neq. Accepted lowercase aliases are eq, neq, lt, gt, lte and gte.

Actions

kindSettings
set_valuevalue: a compatible scalar
clear_valueNo settings; sets null
set_hiddenhidden: boolean
showNo settings; sets hidden false
set_errorserrors: array of strings, empty array clears behavior errors

Actions target the owning field. set_behavior_errors is an accepted alias for set_errors. Validation errors are owned by field validation and are not erased by behavior-error actions.

Graph semantics

Value dependencies must form a DAG. Visibility/error observer loops are allowed. Loading populates all values and stabilizes value-producing rules before observers and validation run. Ordinary edits propagate through the existing queue. Rules and their actions keep declaration order; avoid relying on conflicting writers as a higher-level policy.

Schema general conditions, implicit all/any repeater aggregation and arbitrary cross-instance current selectors are not supported. Use explicit numeric indexes or owning current selectors.