Condividi tramite


ObjectModelValidator.Validate Metodo

Definizione

Overload

Validate(ActionContext, ValidationStateDictionary, String, Object)

Convalida l'oggetto fornito.

Validate(ActionContext, ValidationStateDictionary, String, Object, ModelMetadata)

Convalida il modello a oggetti fornito. Se model è null e è metadataIsRequiredtrue, aggiungerà uno o più errori di stato del modello che Validate(ActionContext, ValidationStateDictionary, String, Object) non sarebbero.

Validate(ActionContext, ValidationStateDictionary, String, Object, ModelMetadata, Object)

Convalida il modello a oggetti fornito. Se model è null e è metadataIsRequiredtrue, aggiungerà uno o più errori di stato del modello che Validate(ActionContext, ValidationStateDictionary, String, Object) non sarebbero.

Validate(ActionContext, ValidationStateDictionary, String, Object)

Origine:
ObjectModelValidator.cs
Origine:
ObjectModelValidator.cs
Origine:
ObjectModelValidator.cs

Convalida l'oggetto fornito.

public:
 virtual void Validate(Microsoft::AspNetCore::Mvc::ActionContext ^ actionContext, Microsoft::AspNetCore::Mvc::ModelBinding::Validation::ValidationStateDictionary ^ validationState, System::String ^ prefix, System::Object ^ model);
public virtual void Validate (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState, string prefix, object model);
public virtual 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
override this.Validate : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary * string * obj -> unit
Public Overridable Sub Validate (actionContext As ActionContext, validationState As ValidationStateDictionary, prefix As String, model As Object)

Parametri

actionContext
ActionContext

Oggetto ActionContext associato alla richiesta corrente.

validationState
ValidationStateDictionary

Oggetto ValidationStateDictionary. Può essere Null.

prefix
String

Prefisso del modello. Utilizzato per eseguire il mapping dell'oggetto modello alle voci in validationState.

model
Object

Oggetto del modello.

Implementazioni

Si applica a

Validate(ActionContext, ValidationStateDictionary, String, Object, ModelMetadata)

Origine:
ObjectModelValidator.cs
Origine:
ObjectModelValidator.cs
Origine:
ObjectModelValidator.cs

Convalida il modello a oggetti fornito. Se model è null e è metadataIsRequiredtrue, aggiungerà uno o più errori di stato del modello che Validate(ActionContext, ValidationStateDictionary, String, Object) non sarebbero.

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

Parametri

actionContext
ActionContext

Oggetto ActionContext.

prefix
String

Chiave del prefisso del modello.

model
Object

Oggetto del modello.

metadata
ModelMetadata

Oggetto ModelMetadata.

Si applica a

Validate(ActionContext, ValidationStateDictionary, String, Object, ModelMetadata, Object)

Origine:
ObjectModelValidator.cs

Convalida il modello a oggetti fornito. Se model è null e è metadataIsRequiredtrue, aggiungerà uno o più errori di stato del modello che Validate(ActionContext, ValidationStateDictionary, String, Object) non sarebbero.

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

Parametri

actionContext
ActionContext

Oggetto ActionContext.

prefix
String

Chiave del prefisso del modello.

model
Object

Oggetto del modello.

metadata
ModelMetadata

Oggetto ModelMetadata.

container
Object

Contenitore del modello

Si applica a