Options
All
  • Public
  • Public/Protected
  • All
Menu

Validator performs validation of the given object based on its metadata.

Hierarchy

  • Validator

Index

Constructors

constructor

Properties

Private coreValidate

coreValidate: any

Performs validation of the given object based on decorators or validation schema. Common method for validateOrReject and validate methods.

Methods

validate

  • Performs validation of the given object based on decorators used in given object class.

    Parameters

    Returns Promise<ValidationError[]>

  • Performs validation of the given object based on validation schema.

    Parameters

    Returns Promise<ValidationError[]>

validateOrReject

  • validateOrReject(object: object, options?: ValidatorOptions): Promise<void>
  • validateOrReject(schemaName: string, object: object, options?: ValidatorOptions): Promise<void>
  • Performs validation of the given object based on decorators used in given object class and reject on error.

    Parameters

    Returns Promise<void>

  • Performs validation of the given object based on validation schema and reject on error.

    Parameters

    Returns Promise<void>

validateSync

  • Performs validation of the given object based on decorators used in given object class. NOTE: This method completely ignores all async validations.

    Parameters

    Returns ValidationError[]

  • Performs validation of the given object based on validation schema.

    Parameters

    Returns ValidationError[]

Generated using TypeDoc