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_-]$ |
"op": "eq"
Section titled “"op": "eq"”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_-]$ |
"op": "ne"
Section titled “"op": "ne"”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_-]$ |
"op": "gt"
Section titled “"op": "gt"”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_-]$ |
"op": "gte"
Section titled “"op": "gte"”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_-]$ |
"op": "lt"
Section titled “"op": "lt"”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_-]$ |
"op": "lte"
Section titled “"op": "lte"”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_-]$ |
"op": "in"
Section titled “"op": "in"”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 |
"op": "notIn"
Section titled “"op": "notIn"”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 |
"op": "matches"
Section titled “"op": "matches"”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 |
"op": "empty"
Section titled “"op": "empty"”True when the field is null, an empty string, or an empty list.
No keys beyond the shared ones.
"op": "notEmpty"
Section titled “"op": "notEmpty"”True when the field holds anything at all.
No keys beyond the shared ones.