Class ValidationRegistry

Manages a set of ValidationChecks to be applied when documents are validated.

Constructors

Methods

  • Register a set of validation checks. Each value in the record can be either a single validation check (i.e. a function) or an array of validation checks.

    Type Parameters

    • T

    Parameters

    • checksRecord: ValidationChecks<T>

      Set of validation checks to register.

    • thisObj: unknown = ...

      Optional object to be used as this when calling the validation check functions.

    • category: ValidationCategory = 'fast'

      Optional category for the validation checks (defaults to 'fast').

    Returns void