Skip to content

Condition

A rule’s trigger, evaluated over one record’s input values. Never throws: a condition pointed at a missing or wrongly-typed value simply does not fire.

Every variant shares the keys below. Which further keys are legal depends on op.

Key Type Required Notes
op one of 11 values — see below yes Selects which shape the rest of this object takes. Every other key is validated against the variant named here.
field string yes The input field whose value is tested. min length 1, matches ^[A-Za-z0-9_-][A-Za-z0-9_ -]*[A-Za-z0-9_-]$|^[A-Za-z0-9_-]$

True when the values are equal.

Key Type Required Notes
value string | number | boolean no The literal to compare against. Give this or otherField, not both.
otherField string no Another input field to compare against, for rules that relate two columns. Give this or value, not both. min length 1, matches ^[A-Za-z0-9_-][A-Za-z0-9_ -]*[A-Za-z0-9_-]$|^[A-Za-z0-9_-]$

True when the values differ.

Key Type Required Notes
value string | number | boolean no The literal to compare against. Give this or otherField, not both.
otherField string no Another input field to compare against, for rules that relate two columns. Give this or value, not both. min length 1, matches ^[A-Za-z0-9_-][A-Za-z0-9_ -]*[A-Za-z0-9_-]$|^[A-Za-z0-9_-]$

True when the field is greater than the comparand.

Key Type Required Notes
value number no The literal to compare against. Give this or otherField, not both.
otherField string no Another input field to compare against, for rules that relate two columns. Give this or value, not both. min length 1, matches ^[A-Za-z0-9_-][A-Za-z0-9_ -]*[A-Za-z0-9_-]$|^[A-Za-z0-9_-]$

True when the field is greater than or equal to the comparand.

Key Type Required Notes
value number no The literal to compare against. Give this or otherField, not both.
otherField string no Another input field to compare against, for rules that relate two columns. Give this or value, not both. min length 1, matches ^[A-Za-z0-9_-][A-Za-z0-9_ -]*[A-Za-z0-9_-]$|^[A-Za-z0-9_-]$

True when the field is less than the comparand.

Key Type Required Notes
value number no The literal to compare against. Give this or otherField, not both.
otherField string no Another input field to compare against, for rules that relate two columns. Give this or value, not both. min length 1, matches ^[A-Za-z0-9_-][A-Za-z0-9_ -]*[A-Za-z0-9_-]$|^[A-Za-z0-9_-]$

True when the field is less than or equal to the comparand.

Key Type Required Notes
value number no The literal to compare against. Give this or otherField, not both.
otherField string no Another input field to compare against, for rules that relate two columns. Give this or value, not both. min length 1, matches ^[A-Za-z0-9_-][A-Za-z0-9_ -]*[A-Za-z0-9_-]$|^[A-Za-z0-9_-]$

True when the field matches one of the listed values.

Key Type Required Notes
value array of string | number | boolean yes The values to match against. at least 1 item

True when the field matches none of the listed values.

Key Type Required Notes
value array of string | number | boolean yes The values to match against. at least 1 item

True when the field matches the regular expression.

Key Type Required Notes
pattern string yes JavaScript regular expression, tested against the value’s string form. Compiled when the config loads. min length 1

True when the field is null, an empty string, or an empty list.

No keys beyond the shared ones.

True when the field holds anything at all.

No keys beyond the shared ones.