Share via


IMetadataBasedModelValidatorProvider Interface

Definition

An IModelValidatorProvider that provides IModelValidator instances exclusively using values in ValidatorMetadata or the model type.

IMetadataBasedModelValidatorProvider can be used to statically determine if a given ModelMetadata instance can incur any validation. The value for HasValidators can be calculated if all instances in ModelValidatorProviders are IMetadataBasedModelValidatorProvider.

public interface class IMetadataBasedModelValidatorProvider : Microsoft::AspNetCore::Mvc::ModelBinding::Validation::IModelValidatorProvider
public interface IMetadataBasedModelValidatorProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider
type IMetadataBasedModelValidatorProvider = interface
    interface IModelValidatorProvider
Public Interface IMetadataBasedModelValidatorProvider
Implements IModelValidatorProvider
Implements

Methods

CreateValidators(ModelValidatorProviderContext)

Creates the validators for ModelMetadata.

(Inherited from IModelValidatorProvider)
HasValidators(Type, IList<Object>)

Gets a value that determines if the IModelValidatorProvider can produce any validators given the modelType and modelType.

Applies to