Skip to main content

Built-in checks

Add these in a stage's Checks & Quality control section with + Add builtin check. See Checks for how checks work.

A path says where in the output to look: a field name, or fields separated by dots such as scene.narration. Leave it empty to check the whole output. Text checks read the text of a text output, or the words spoken in a Generate Speech output, without needing a path.

Settings marked required must be filled in. A min or max left empty isn't checked.

CheckWhat it testsSettings
non_emptyA value is not empty: text that isn't blank, a list with items, an object with fieldspath
word_countThe number of words in some textpath, min, max
regex_matchSome text matches a patternpattern (required), flags, path
regex_absentSome text does not match a patternpattern (required), flags, path
numeric_rangeA number is within a rangepath (required), min, max
array_lengthA list has a number of items within a rangepath (required), min, max
duration_rangeThe length of a video or audio file, in secondsmin, max
media_formatThe file's container and/or codeccontainer, codec
wpmWords spoken per minute, in a Generate Speech outputmin, max
drawingA drawing a model made can be drawn: its paths are validpath

Details​

Words are counted by splitting on spaces and line breaks.

Patterns (regex_match, regex_absent) are regular expressions of up to 200 characters. flags are the usual single letters, up to 5, such as i to ignore capital letters. The text must be text: a pattern on a number fails. A pattern that isn't valid is an authoring error.

duration_range and media_format read the file's technical details. They fail with artifact has no probe metadata if Reelcraft couldn't read the file.

wpm divides the spoken words by the audio's length in minutes. It only works on Generate Speech outputs.

drawing checks a drawing, or a list of drawings, an id and strokes of SVG path data on a 100 by 100 grid. Every path must use only the drawing commands (M L H V C S Q T A Z), stay on the grid, and be big enough to see; colours must be theme colours or hex colours; line weights thin, normal or bold. It lists everything wrong at once, by stroke, so that the retry that follows can fix it. Put it on the stage that draws, with a path of drawings if the answer holds a list. See Prepare Drawings.

motion_code checks a motion graphic's code: it parses, imports only Remotion's packages and React, has a default export, and uses no network, storage, clock, timers, random numbers or CSS animations. It lists every problem at once. Put it on a Generate Motion Graphic stage, with Check attempts of 2 or 3, so the model fixes what's wrong.

Messages​

A failing check says why, prefixed with its name. For example:

  • word_count: 41 words, expected at least 60
  • regex_absent: pattern "buy now" unexpectedly matched
  • numeric_range: 12 is above maximum 10
  • array_length: length 2 is below minimum 3
  • duration_range: 34.2s is above maximum 30s
  • wpm: 187.3 words/min is above maximum 170
  • non_empty: value at "script" is empty
  • drawing: stroke 2: the path leaves the 100 by 100 grid (it spans 0,0 to 900,900)

A check that is itself wrong, such as a bad setting or a script with an error, is reported as an authoring problem instead. See When a stage fails.