Ανάγνωση στα Αγγλικά

Κοινή χρήση μέσω


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.

C#
public interface IMetadataBasedModelValidatorProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.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

Προϊόν Εκδόσεις
ASP.NET Core 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0