共用方式為


ValidationVisitor.Visit(ModelMetadata, String, Object) 方法

定義

驗證模型中的專案。

protected:
 virtual bool Visit(Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, System::String ^ key, System::Object ^ model);
protected virtual bool Visit (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model);
protected virtual bool Visit (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string? key, object? model);
abstract member Visit : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * string * obj -> bool
override this.Visit : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * string * obj -> bool
Protected Overridable Function Visit (metadata As ModelMetadata, key As String, model As Object) As Boolean

參數

metadata
ModelMetadata

模型中繼資料。

key
String

要驗證的金鑰。

model
Object

要驗證的模型。

傳回

指定的模型索引鍵是否有效。

適用於