Options
All
  • Public
  • Public/Protected
  • All
Menu

External module Validation

Index

Type aliases

PropertyValidator

PropertyValidator: function
PropertyValidator<T extends object>(target: object, property: string, config?: T) => boolean

Type declaration

    • (target: object, property: string, config?: T): boolean
    • Parameters

      • target: object
        • [key: string]: any
      • property: string
      • Optional config: T

      Returns boolean

Validator

Validator: function
Validator() => boolean

Validator.Config?: ValidatorConfig & { [key: string]: any }

Type declaration

    • (): boolean
    • Returns boolean

Functions

errorTemplate

  • errorTemplate(strings: TemplateStringsArray, ...keys: string[]): function

getValidators

  • getValidators(target: object): object
  • getValidators(target: object, property: string): Array<[string, Validator]>
  • getValidators(target: object, property: string, name: string): function | undefined
  • Parameters

    • target: object
      • [key: string]: any

    Returns object

    • [key: string]: any
  • Parameters

    • target: object
      • [key: string]: any
    • property: string

    Returns Array<[string, Validator]>

  • Parameters

    • target: object
      • [key: string]: any
    • property: string
    • name: string

    Returns function | undefined

registerValidator

  • Type parameters

    • T: object

    Parameters

    Returns function

      • Parameters

        Returns function

          • (target: object, property: string): void
          • Parameters

            • target: object
              • [key: string]: any
            • property: string

            Returns void

validate

  • validate(target: any): [boolean, object]

Generated using TypeDoc