Table of Contents

Class ValidationExtensions

Namespace
Excalibur.Application
Assembly
Excalibur.Application.dll

Provides extension methods for FluentValidation rules to validate tenant IDs and correlation IDs.

public static class ValidationExtensions
Inheritance
ValidationExtensions
Inherited Members

Methods

IsValidCorrelationId<T>(IRuleBuilder<T, Guid>)

Defines a validation rule for correlation IDs to ensure they are not empty GUIDs.

public static IRuleBuilderOptions<T, Guid> IsValidCorrelationId<T>(this IRuleBuilder<T, Guid> ruleBuilder)

Parameters

ruleBuilder IRuleBuilder<T, Guid>

The rule builder to extend.

Returns

IRuleBuilderOptions<T, Guid>

An FluentValidation.IRuleBuilderOptions<T, TProperty> that can be used to configure additional options for the rule.

Type Parameters

T

The type of the object being validated.

IsValidTenantId<T>(IRuleBuilder<T, string>)

Defines a validation rule for tenant IDs to ensure they are not empty.

public static IRuleBuilderOptions<T, string> IsValidTenantId<T>(this IRuleBuilder<T, string> ruleBuilder)

Parameters

ruleBuilder IRuleBuilder<T, string>

The rule builder to extend.

Returns

IRuleBuilderOptions<T, string>

An FluentValidation.IRuleBuilderOptions<T, TProperty> that can be used to configure additional options for the rule.

Type Parameters

T

The type of the object being validated.