Dela via


ValidatorCache.GetValidators(ModelMetadata, IModelValidatorProvider) Method

Definition

Get the validators for a model.

public:
 System::Collections::Generic::IReadOnlyList<Microsoft::AspNetCore::Mvc::ModelBinding::Validation::IModelValidator ^> ^ GetValidators(Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, Microsoft::AspNetCore::Mvc::ModelBinding::Validation::IModelValidatorProvider ^ validatorProvider);
public System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidator> GetValidators (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider validatorProvider);
member this.GetValidators : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider -> System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidator>
Public Function GetValidators (metadata As ModelMetadata, validatorProvider As IModelValidatorProvider) As IReadOnlyList(Of IModelValidator)

Parameters

metadata
ModelMetadata

The model metadata.

validatorProvider
IModelValidatorProvider

The validator provider.

Returns

A list of model validators.

Applies to