Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Validator

description

Creates a Validator.

Hierarchy

  • Validator

Index

Constructors

Methods

Constructors

constructor

  • description

    Creates a validator schema.

    Parameters

    • objectOfRules: IValidatorRuleSet

      Set of Rule(s). key should match with the key of object being validated.

    • Optional options: IValidatorOptions

      Options for validator schema.

    Returns Validator

Methods

validate

  • description

    Validates the values passed and returns errors object if any, otherwise return undefined along with values.

    Parameters

    Returns IValidatorValidateReturn

    Object containing values and errors

Generated using TypeDoc