共用方式為


ModelValidatorProviderCollection.GetValidators 方法

定義

傳回驗證程式的集合。

public:
 System::Collections::Generic::IEnumerable<System::Web::ModelBinding::ModelValidator ^> ^ GetValidators(System::Web::ModelBinding::ModelMetadata ^ metadata, System::Web::ModelBinding::ModelBindingExecutionContext ^ context);
public System.Collections.Generic.IEnumerable<System.Web.ModelBinding.ModelValidator> GetValidators (System.Web.ModelBinding.ModelMetadata metadata, System.Web.ModelBinding.ModelBindingExecutionContext context);
member this.GetValidators : System.Web.ModelBinding.ModelMetadata * System.Web.ModelBinding.ModelBindingExecutionContext -> seq<System.Web.ModelBinding.ModelValidator>
Public Function GetValidators (metadata As ModelMetadata, context As ModelBindingExecutionContext) As IEnumerable(Of ModelValidator)

參數

metadata
ModelMetadata

中繼資料。

context
ModelBindingExecutionContext

執行內容。

傳回

IEnumerable<ModelValidator>

驗證程式。

適用於