Options
Menu

Interface IAbstractValidator

It represents abstract validator for type of .

Index

Properties

ForList

ForList: boolean

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

Methods

CreateAbstractListRule

CreateAbstractRule

CreateRule

  • It creates new concrete validation rule and assigned data context to this rule.

    constructor

    Parameters

    • name: string

      of the rule

    Returns IAbstractValidationRule

RuleFor

  • Register property validator for property.

    Parameters

    Returns any

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

    Returns any

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

    • prop: string

      name

    • validatorFce: IValidatorFce

      name validation function

    Returns any

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

    Returns any

Generated using TypeDoc