共用方式為


DataAnnotationsModelValidatorProvider.GetValidators 方法

定義

取得模型的驗證程式集合。

protected:
 override System::Collections::Generic::IEnumerable<System::Web::ModelBinding::ModelValidator ^> ^ GetValidators(System::Web::ModelBinding::ModelMetadata ^ metadata, System::Web::ModelBinding::ModelBindingExecutionContext ^ context, System::Collections::Generic::IEnumerable<Attribute ^> ^ attributes);
protected override System.Collections.Generic.IEnumerable<System.Web.ModelBinding.ModelValidator> GetValidators (System.Web.ModelBinding.ModelMetadata metadata, System.Web.ModelBinding.ModelBindingExecutionContext context, System.Collections.Generic.IEnumerable<Attribute> attributes);
override this.GetValidators : System.Web.ModelBinding.ModelMetadata * System.Web.ModelBinding.ModelBindingExecutionContext * seq<Attribute> -> seq<System.Web.ModelBinding.ModelValidator>
Protected Overrides Function GetValidators (metadata As ModelMetadata, context As ModelBindingExecutionContext, attributes As IEnumerable(Of Attribute)) As IEnumerable(Of ModelValidator)

參數

metadata
ModelMetadata

中繼資料。

context
ModelBindingExecutionContext

執行內容。

attributes
IEnumerable<Attribute>

驗證屬性。

傳回

驗證程式的集合。

適用於