Options
Menu
ngdoc

object

name

AbstractValidator

module

Validation

description

It enables to create custom validator for your own abstract object (class) and to assign validation rules to its properties. You can assigned these rules

  • register property validation rules - use RuleFor property
  • register property async validation rules - use RuleFor property
  • register shared validation rules - use Validation or ValidationFor property
  • register custom object validator - use ValidatorFor property - enables composition of child custom validators

Index

Properties

AbstractValidators

AbstractValidators: Object

AbstractValidators index signature

  • Parameters

    • name: string

    Returns IAbstractValidator

ForList

ForList: boolean

Return true if this validation rule is intended for list of items, otherwise true.

ValidationFunctions

ValidationFunctions: Object

ValidationFunctions index signature

  • Parameters

    • name: string

    Returns IValidatorFce[]

Validators

Validators: Object

Validators index signature

  • Parameters

    • name: string

    Returns IPropertyValidator[]

Methods

CreateAbstractListRule

CreateAbstractRule

CreateRule

RuleFor

  • Register property validator for property.

    Parameters

Validation

  • Register shared validation. There are no relationship to dependent property. Dependency = when the property is validated then the shared rule is validated also.

    Parameters

ValidationFor

  • Register shared validation and assign property name as dependency on shared rule. Dependency = when the property is validated then the shared rule is validated also.

    Parameters

ValidatorFor

  • Register child validator for property - composition of validators

    Parameters

    • prop: string

      name

    • validator: IAbstractValidator

      child validator

    • forList?: boolean optional

      true if is array structure, otherwise false

Generated using TypeDoc