Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DefaultSchemaValidator

The default implementation of a schema validator.

Hierarchy

  • DefaultSchemaValidator

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Instantiate a schema validator.

    Returns DefaultSchemaValidator

Properties

Private _addSchema

_addSchema: any

Add a schema to the validator.

param

The plugin ID.

param

The schema being added.

returns

A list of errors if the schema fails to validate or null if there are no errors.

Notes

It is safe to call this function multiple times with the same plugin name.

Private _composer

_composer: any

Private _validator

_validator: any

Methods

validateData

  • Validate a plugin's schema and user data; populate the composite data.

    Parameters

    • plugin: IPlugin

      The plugin being validated. Its composite data will be populated by reference.

    • Optional populate: boolean

      Whether plugin data should be populated, defaults to true.

    Returns IError[]

    A list of errors if either the schema or data fail to validate or null if there are no errors.

Generated using TypeDoc