Function: missingRequiredLoop()
missingRequiredLoop(
position,loop):X12ParseWarning
Build an X12_MISSING_REQUIRED_LOOP warning. Emitted when a TR3-required
loop is structurally absent (e.g. no Loop 2010BB Payer Name inside a
Subscriber HL). The parser does not enforce situational rules: only loops
marked usage: "required" in the loop spec fire this warning, so the
loop id and its rationale are both library constants.
Parameters
position
loop
Returns
Example
import { missingRequiredLoop, REQUIRED_LOOPS } from "@cosyte/x12";
const w = missingRequiredLoop(
{ segmentIndex: 12, groupIndex: 0, transactionIndex: 0 },
REQUIRED_LOOPS.PAYER_NAME_2010BB,
);