ValidatorCache.GetValidators(ModelMetadata, IModelValidatorProvider) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得模型的驗證程式。
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)
參數
- metadata
- ModelMetadata
模型中繼資料。
- validatorProvider
- IModelValidatorProvider
驗證程式提供者。
傳回
模型驗證程式的清單。