Skip to content

Validations

A step's validate: entries check the outputs it published. input names one of the step's output fields — a dotted name reaches inside it. The operator is given either in with: (validate/assert + operator: equals) or as a suffix of uses (validate/assert/equals); when neither names one, not_null applies. severity is HARD (default, fails the step) or SOFT (reported as a warning).

Assertion kinds

uses Checks Reads from with:
validate/assert Compare the output named by input under operator. input, operator, operands, severity
validate/field Compare the value at path inside the output named by input under operator. input, path, operator, operands, severity
validate/schema Validate the output named by input against the JSON Schema given as schema. input, schema, severity

Operators

The same operators are used by validate/assert, validate/field and the Condition of flow/if. An operand the operator does not read is rejected rather than ignored.

Operator Operands Fails with
not_null — Expected a non-null value, got <input>
is_null — Expected null, got <input>
not_empty — Expected a non-empty value, got <input>
equals value Expected <value>, got <input>
not_equals value Expected a value other than <value>, got <input>
contains value Expected <input> to contain <value>
not_contains value Expected <input> to NOT contain <value>
matches_regex value Pattern <value> not matched in <input>
one_of value Expected <input> to be one of <value>
none_of value Expected <input> to be none of <value>
has_key value Expected <input> to have key <value>
not_has_key value Expected <input> to NOT have key <value>
gt value Expected <input> to be greater than <value>
gte value Expected <input> to be greater than or equal to <value>
lt value Expected <input> to be less than <value>
lte value Expected <input> to be less than or equal to <value>
length_equals value Expected <input> to have length <value>
length_gt value Expected <input> to be longer than <value>
length_lt value Expected <input> to be shorter than <value>
between min, max Expected <input> to be between <min> and <max>