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 ​
import type { ValidationCounts } from '@facturometro/validator';
const ran = (counts: ValidationCounts) => counts.evaluated + counts.skippedByGate;Properties ​
evaluated ​
readonlyevaluated: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 ​
readonlyfatal:number
Defined in: packages/validator/src/engine/validate.ts:95
Fatal issues found, the EINV-XSD-LEXICAL ones included.
rulesSkippedByLexical ​
readonlyrulesSkippedByLexical: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 ​
readonlyskippedByGate:number
Defined in: packages/validator/src/engine/validate.ts:102
Rules whose when gate returned false.
testsSkippedByLexical ​
readonlytestsSkippedByLexical: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 ​
readonlywarning:number
Defined in: packages/validator/src/engine/validate.ts:110
Warnings found.