Class ContextValidationOptions
- Namespace
- Excalibur.Dispatch.Options.Validation
- Assembly
- Excalibur.Dispatch.dll
Configuration options for context validation middleware.
public sealed class ContextValidationOptions
- Inheritance
-
ContextValidationOptions
- Inherited Members
- Extension Methods
Properties
Checks
Gets the toggles controlling which context validation checks are performed.
public ContextValidationChecksOptions Checks { get; init; }
Property Value
- ContextValidationChecksOptions
The current Checks value.
CustomValidatorTypes
Gets custom validation extensions.
public List<Type> CustomValidatorTypes { get; init; }
Property Value
- List<Type>
The current CustomValidatorTypes value.
Remarks
Allows adding custom validation logic through configuration.
EnableDetailedDiagnostics
Gets or sets a value indicating whether to enable detailed diagnostics.
public bool EnableDetailedDiagnostics { get; set; }
Property Value
- bool
The current EnableDetailedDiagnostics value.
Remarks
When enabled, provides detailed information about validation failures.
FieldValidationRules
Gets the list of fields that require special validation.
public IDictionary<string, FieldValidationRule> FieldValidationRules { get; init; }
Property Value
- IDictionary<string, FieldValidationRule>
The list of fields that require special validation.
Remarks
Maps field names to validation rules.
MaxMessageAge
Gets or sets the maximum allowed age for a message context.
public TimeSpan? MaxMessageAge { get; set; }
Property Value
- TimeSpan?
The maximum allowed age for a message context.
Remarks
Messages older than this are considered potentially corrupted.
Mode
Gets or sets the validation mode.
public ValidationMode Mode { get; set; }
Property Value
- ValidationMode
The current Mode value.
Remarks
Strict mode rejects messages with invalid context. Lenient mode logs warnings but continues processing.
RequiredFields
Gets the list of required field names.
public List<string> RequiredFields { get; init; }
Property Value
- List<string>
The current RequiredFields value.
Remarks
These fields must be present and non-null for validation to pass.