Function: validateStrict()

February 7, 2026 ยท View on GitHub

CTRF


CTRF / validateStrict

Function: validateStrict()

validateStrict(report): asserts report is CTRFReport

Defined in: validate.ts:105

Parameters

report

unknown

The object to validate

Returns

asserts report is CTRFReport

Throws

ValidationError if the report is invalid

Example

try {
  validateStrict(report);
  // TypeScript now knows report is CTRFReport
} catch (e) {
  if (e instanceof ValidationError) {
    console.log(e.errors);
  }
}

Contents

  1. 1Parameters
  2. 1.1report
  3. 2Returns
  4. 3Throws
  5. 4Example