FluentValidationPolymorphicPropertyValidatorExtensions.

UsePolymorphicValidator<T, TProperty>(IRuleBuilder<T, TProperty>, IServiceProvider) Method

Summary

Uses the polymorphic validator.

Syntax

public static IRuleBuilderOptions<T, TProperty> UsePolymorphicValidator<T, TProperty>(this IRuleBuilder<T, TProperty> builder, IServiceProvider serviceProvider)

Attributes

Type Description
NullableContextAttribute

Type Parameters

Name Description
T
TProperty The type of the t property.

Parameters

Name Type Description
builder IRuleBuilder<T, TProperty> The builder.
serviceProvider IServiceProvider The service provider.

Return Value

Type Description
IRuleBuilderOptions<T, TProperty> IRuleBuilderOptions{T, TProperty}.