Skip to content

Documentation / @facturometro/validator / ValidationCounts

Interface: ValidationCounts ​

Defined in: packages/validator/src/engine/validate.ts:88

How many rules a run evaluated and what it found.

The counts come in two units. evaluated, skippedByGate and rulesSkippedByLexical count rules and add up to the ruleset's size; testsSkippedByLexical counts rule x context node tests inside the evaluated rules; fatal and warning count issues.

Example ​

ts
import type { ValidationCounts } from '@facturometro/validator';

const ran = (counts: ValidationCounts) => counts.evaluated + counts.skippedByGate;

Properties ​

evaluated ​

readonly evaluated: number

Defined in: packages/validator/src/engine/validate.ts:93

Rules whose gate passed, whose context was selected and whose context nodes were tested, or that crashed in their gate or context selection (reported as EINV-RULE-ERROR).


fatal ​

readonly fatal: number

Defined in: packages/validator/src/engine/validate.ts:95

Fatal issues found, the EINV-XSD-LEXICAL ones included.


rulesSkippedByLexical ​

readonly rulesSkippedByLexical: number

Defined in: packages/validator/src/engine/validate.ts:100

Rules skipped as a whole because their when gate or context selection cast a value the lexical pre-pass reported. No built-in rule casts there, so only custom rules add to it.


skippedByGate ​

readonly skippedByGate: number

Defined in: packages/validator/src/engine/validate.ts:102

Rules whose when gate returned false.


testsSkippedByLexical ​

readonly testsSkippedByLexical: number

Defined in: packages/validator/src/engine/validate.ts:108

Tests skipped because they cast a value the lexical pre-pass reported: one per context node of an evaluated rule, so a rule with three lines and one bad price counts as evaluated and adds one here.


warning ​

readonly warning: number

Defined in: packages/validator/src/engine/validate.ts:110

Warnings found.

MIT licensed. Specification artefacts belong to OpenPEPPOL, CEN and OASIS.