Bagikan melalui


IObjectModelValidator.Validate Metode

Definisi

Memvalidasi objek yang disediakan.

public:
 void Validate(Microsoft::AspNetCore::Mvc::ActionContext ^ actionContext, Microsoft::AspNetCore::Mvc::ModelBinding::Validation::ValidationStateDictionary ^ validationState, System::String ^ prefix, System::Object ^ model);
public void Validate (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState, string prefix, object model);
public void Validate (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary? validationState, string prefix, object? model);
abstract member Validate : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary * string * obj -> unit
Public Sub Validate (actionContext As ActionContext, validationState As ValidationStateDictionary, prefix As String, model As Object)

Parameter

actionContext
ActionContext

Yang ActionContext terkait dengan permintaan saat ini.

validationState
ValidationStateDictionary

ValidationStateDictionary. Mungkin null.

prefix
String

Awalan model. Digunakan untuk memetakan objek model ke entri dalam validationState.

model
Object

Objek model.

Berlaku untuk