IObjectModelValidator.Validate 方法

定义

验证提供的对象。

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)

参数

actionContext
ActionContext

ActionContext与当前请求关联的 。

validationState
ValidationStateDictionary

ValidationStateDictionary。 可能为 null。

prefix
String

模型前缀。 用于将模型对象映射到 中的 validationState条目。

model
Object

对象模型。

适用于