Skip to main content
Version: v0.0.3

Interface: SegmentRule

A rule for one segment type. usage constrains whether the segment must / must not appear; cardinality constrains how many times; fields are the per-field rules, applied to every occurrence of the segment.

Properties

cardinality?

readonly optional cardinality?: Cardinality

Occurrence-count constraint for this segment across the message.


fields?

readonly optional fields?: readonly FieldRule[]

Per-field rules, applied to each occurrence of this segment.


segment

readonly segment: string

Segment name: 3 chars, [A-Z][A-Z0-9]{2} (standard or Z… segment).


severity?

readonly optional severity?: FindingSeverity

Severity for the segment-level presence / cardinality findings. Default "error".


usage?

readonly optional usage?: UsageCode

Usage for the segment as a whole. R ⇒ at least one occurrence required; X ⇒ none permitted; RE / O ⇒ no presence constraint; C / CE ⇒ presence not evaluated (no predicate language). Omitted ⇒ Optional.