Skip to content

DisplayRule

A purely visual rule over displayed input values. Rules never affect what is exported — that guarantee is structural, since the module evaluating them is never imported on the export path.

Key Type Required Notes
name string yes Identifies the rule; shown in diagnostics and used as a stable render key. min length 1, matches ^[A-Za-z0-9_-][A-Za-z0-9_ -]*[A-Za-z0-9_-]$|^[A-Za-z0-9_-]$
when Condition yes The condition that fires this rule.
appliesTo array of string no Fields to style when the rule fires. Defaults to the field the condition tests, which is what you want for a single-field rule and never what you want when comparing two. at least 1 item
style Style yes How the matched fields are styled.