Options
Menu

Interface IValidationResult

This class provides unit of information about error. Implements composite design pattern to enable nesting of error information.

Index

Properties

Children

Children: IValidationResult[]

Return collections of child errors information.

ErrorCount

ErrorCount: number

Return number of errors.

ErrorMessage

ErrorMessage: string

Return error message, if there is no error, return empty string.

HasErrors

HasErrors: boolean

Return true if there is any error.

HasErrorsDirty

HasErrorsDirty: boolean

Return true if there is any error and hasw dirty state.

Name

Name: string

The name of error collection.

optional Optional

Optional?: IOptional

It enables to have errors optional.

optional TranslateArgs

TranslateArgs?: IErrorTranslateArgs[]

It enables support for localization of error messages.

Methods

Add

  • Add error information to child collection of errors.

    Parameters

Remove

  • Remove(index: number)
  • Remove error information from child collection of errors.

    Parameters

    • index: number
      • index of error information to be removed.

Generated using TypeDoc