Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/rulvar / requiredSectionsValidator

Function: requiredSectionsValidator()

ts
function requiredSectionsValidator(options): FinishValidator;

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

Requires every named section to appear LITERALLY in the result text (a heading like 'FINDINGS' or any marker the goal demands). Default name 'required-sections'; pass name to run several instances. match: 'line' demands each marker as its own line and fencedCode: 'excluded' ignores markers inside fenced code blocks (cycle 74); both default to the historical byte identical behavior.

Parameters

ParameterType
options{ fencedCode?: FencedCodeMode; match?: SectionMatchMode; name?: string; sections: readonly string[]; }
options.fencedCode?FencedCodeMode
options.match?SectionMatchMode
options.name?string
options.sectionsreadonly string[]

Returns

FinishValidator