Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RuleSet

Creates a set of rules for a single key.

Hierarchy

  • RuleSet

Index

Constructors

Methods

Constructors

constructor

  • description

    Create a ruleset for a particular key or value.

    Parameters

    Returns RuleSet

Methods

validate

  • description

    Validates the value and returns an array of errors if any, othewise returns undefined.

    Parameters

    • valueToCheck: any

      Value to be validated

    • key: string

      Key of the value being checked

    • options: IRuleSetValidateOptions

      Options for validate

    Returns IRuleSetValidateReturn

    An object containing value and errors if any

Generated using TypeDoc