Объект, выполняющий построение результата валидации.

Hierarchy

  • ValidationResultBuilder

Implements

Constructors

Accessors

Methods

Constructors

Accessors

  • get hasData(): boolean
  • Returns an indication that the object contains validation messages.

    Returns boolean

  • get isSuccessful(): boolean
  • Returns an indication that the validation result will succeed when built.

    Returns boolean

Methods

  • Adds an informational message with the specified text.

    Returns

    Текущий объект IValidationResultBuilder.

    Parameters

    • key: ValidationKey

      Key of the validation message.

    • type: ValidationResultType

      Type of the validation message.

    • message: string | Error

      Text of the message or error object that occurred during validation.

    • Optional fieldName: null | string

      Name of the field of the object to which the validation message refers, or null if the field is unknown.

    • Optional objectName: null | string

      Name of the object to which the validation message refers, or null if name is unknown.

    • Optional objectType: null | string

      Type of the object to which the validation message refers, or null if type is unknown.

    • Optional details: null | string

      Additional information about the message, such as full text of exception, or null if there is no additional information.

    Returns IValidationResultBuilder

  • Добавляет копию указанного сообщения валидации.

    Returns

    Текущий объект IValidationResultBuilder.

    Parameters

    • validationResult: ValidationResult

      Сообщение валидации, копия которого добавляется.

    Returns IValidationResultBuilder

  • Добавляет сообщения валидации, которые были добавлены в заданный объект, выполняющий построение результата валидации.

    Returns

    Текущий объект IValidationResultBuilder.

    Parameters

    • validationResultBuilder: IValidationResultBuilder

      Объект, выполняющий построение результата валидации. Нельзя передать текущий объект в качестве параметра.

    Returns IValidationResultBuilder

  • Выполняет построение объекта, содержащего результат валидации.

    Returns

    Результат валидации.

    Returns ValidationResult

  • Удаляет все сообщения валидации.

    Returns void

Generated using TypeDoc