Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/rulvar / minMatchesValidator

Function: minMatchesValidator()

ts
function minMatchesValidator(options): FinishValidator;

Defined in: packages/core/dist/index.d.ts

Requires at least min matches of pattern in the result text (the plan's citation and source count checks: a file:line pattern, a URL pattern). The pattern compiles at construction (invalid patterns are a ConfigError before any run exists) and matches globally; min is a positive integer. Default name 'min-matches'; pass name to run several instances, because names must be unique per orchestrate call. fencedCode: 'excluded' matches only outside fenced code blocks (cycle 74), so citations quoted inside code samples do not count; the default matches everything, byte identical to the historical behavior.

Parameters

ParameterType
options{ fencedCode?: FencedCodeMode; flags?: string; min: number; name?: string; pattern: string; }
options.fencedCode?FencedCodeMode
options.flags?string
options.minnumber
options.name?string
options.patternstring

Returns

FinishValidator