Table of Contents

Interface IValidationResult

Namespace
Excalibur.Dispatch.Validation
Assembly
Excalibur.Dispatch.Abstractions.dll

Represents the result of a validation operation on a message.

public interface IValidationResult
Extension Methods

Remarks

Validation results provide structured feedback about the validity of a message, including specific error details when validation fails. The result is used by the validation middleware to determine whether message processing should continue or be rejected. Key features include:

  • Boolean validation status indicator
  • Collection of detailed error information
  • Immutable result state for thread safety

Implementations should provide meaningful error messages that help developers understand validation failures.

Properties

Errors

Gets the collection of validation errors, if any.

IReadOnlyCollection<object> Errors { get; }

Property Value

IReadOnlyCollection<object>

Remarks

Contains detailed information about validation failures. Error objects can be strings, ValidationError instances, or any other type that provides meaningful error context. Empty when IsValid is true.

IsValid

Gets or sets a value indicating whether the validation passed.

bool IsValid { get; }

Property Value

bool

Remarks

When true, the message passed all validation rules and processing can continue. When false, the Errors collection should contain details about the validation failures.