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
ruleBuilderIRuleBuilder<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
TThe 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
ruleBuilderIRuleBuilder<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
TThe type of the object being validated.