Skip to content

Umpire Schema Reference ​

Top-level shape ​

PropertyTypeRequiredDescription
version1 (literal)yesSchema version
conditionsRecord<string, JsonConditionDef>noNamed runtime conditions
fieldsRecord<string, JsonFieldDef>yesField definitions (min 1)
rulesJsonRule[]yesRule array
validatorsRecord<string, JsonValidatorDef>noNamed portable validators
excludedExcludedRule[]noRules excluded during migration

Rule types ​

The type field discriminates between rule variants.

typeRequired propertiesDescription
enabledWhenfield, whenEnable a field when an expression is true
disablessource / when, targetsDisable target fields when a source is satisfied
requiresfield, (dependency | dependencies | when)Require a dependency before a field is enabled
fairWhenfield, whenMark a field as foul when an expression is true
checkfield, op (and validator params)Attach a portable validator to a field
oneOfgroup, branchesPresent exactly one named branch
anyOfrulesAt least one nested rule must pass
eitherOfgroup, branchesNamed groups of ANDed rules

All rule types accept an optional reason string for the blocking message.

requires variants ​

json
// Single dependency
{ "type": "requires", "field": "a", "dependency": "b" }

// Multiple dependencies
{ "type": "requires", "field": "a", "dependencies": ["b", { "op": "present", "field": "c" }] }

// Conditional dependency
{ "type": "requires", "field": "a", "when": { "op": "eq", "field": "b", "value": true } }

disables variants ​

json
// Source field
{ "type": "disables", "source": "a", "targets": ["b", "c"] }

// Conditional
{ "type": "disables", "when": { "op": "present", "field": "a" }, "targets": ["b"] }

Expression operators ​

The op field discriminates between expression variants.

Comparisons ​

opPropertiesDescription
eqfield, valueField equals value
neqfield, valueField does not equal value
gtfield, valueField greater than value (number)
gtefield, valueField greater than or equal (number)
ltfield, valueField less than value (number)
ltefield, valueField less than or equal (number)

Presence ​

opPropertiesDescription
presentfieldField has a non-empty value
absentfieldField is missing or empty
truthyfieldField value is truthy
falsyfieldField value is falsy

Membership ​

opPropertiesDescription
infield, valuesField value is in the list
notInfield, valuesField value is not in the list
containsfield, valueArray-valued field holds the value

in and notIn compare a scalar field value against a list of primitives. They do not look inside an array value. fieldInCond does the same against a named array condition. contains is the reverse: the field holds an array, and value is one primitive to find in it.

SituationResult
in, notIn, or fieldInCond targets a field declared "isEmpty": "array"Definition error: "in" requires a scalar field (or "notIn", "fieldInCond")
contains targets a field declared "isEmpty" as "string", "number", "boolean", or "object"Definition error: "contains" requires an array field
contains evaluates a value that is not an array (absent, null, a scalar, or an object)false
contains evaluates an arraytrue when an element equals value
in or fieldInCond evaluates an array value on a field not declared "isEmpty": "array"false; notIn is true

Every membership op compares with JSON equality and no type coercion: 22 does not equal "22", and true does not equal 1. Numbers compare by value, so 22 equals 22.0. Fields with "isEmpty": "present" or no isEmpty can be the target of any membership op.

A definition error is raised when the schema is validated, before any evaluation. It applies to every expression position at any depth: enabledWhen, fairWhen, disables, and requires (when and dependencies), inside and, or, and not, and inside the rules of anyOf and eitherOf branches.

Conditions ​

opPropertiesDescription
condconditionNamed condition is truthy
condEqcondition, valueNamed condition equals value
condIncondition, valuesNamed condition value is in the list
fieldInCondfield, conditionField value exists in a named array condition

Logical combinators ​

opPropertiesDescription
andexprsAll sub-expressions must be true
orexprsAt least one sub-expression must be true
notexprNegate a sub-expression

Check expression ​

opPropertiesDescription
checkfield, checkInline validator spec on a field

Validator operators ​

Used in top-level validators and inline in check rules and expressions.

opPropertiesDescription
email—Valid email address
url—Valid URL
integer—Integer value
matchespatternMatches regex pattern
minLengthvalueMinimum string length
maxLengthvalueMaximum string length
minvalueMinimum numeric value
maxvalueMaximum numeric value
rangemin, maxNumeric range (inclusive)

All validators accept an optional error string for the failure message.

Field definitions ​

PropertyTypeDescription
requiredbooleanField must have a value
defaultstring | number | boolean | nullDefault value when absent
isEmpty"string" | "number" | "boolean" | "array" | "object" | "present"How to determine emptiness

Condition definitions ​

PropertyTypeDescription
type"boolean" | "string" | "number" | "string[]" | "number[]"Condition value type
descriptionstringHuman-readable description