共用方式為


ModelMetadata.GetValidators(ModelBindingExecutionContext) 方法

定義

傳回套用至模型的驗證程式集合。

public:
 virtual System::Collections::Generic::IEnumerable<System::Web::ModelBinding::ModelValidator ^> ^ GetValidators(System::Web::ModelBinding::ModelBindingExecutionContext ^ context);
public virtual System.Collections.Generic.IEnumerable<System.Web.ModelBinding.ModelValidator> GetValidators (System.Web.ModelBinding.ModelBindingExecutionContext context);
abstract member GetValidators : System.Web.ModelBinding.ModelBindingExecutionContext -> seq<System.Web.ModelBinding.ModelValidator>
override this.GetValidators : System.Web.ModelBinding.ModelBindingExecutionContext -> seq<System.Web.ModelBinding.ModelValidator>
Public Overridable Function GetValidators (context As ModelBindingExecutionContext) As IEnumerable(Of ModelValidator)

參數

context
ModelBindingExecutionContext

模型繫結執行內容。

傳回

驗證程式的集合。

適用於