ObjectModelValidator.Validate Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
Validate(ActionContext, ValidationStateDictionary, String, Object) |
Convalida l'oggetto fornito. |
Validate(ActionContext, ValidationStateDictionary, String, Object, ModelMetadata) |
Convalida il modello a oggetti fornito.
Se |
Validate(ActionContext, ValidationStateDictionary, String, Object, ModelMetadata, Object) |
Convalida il modello a oggetti fornito.
Se |
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 è metadata
IsRequiredtrue
, 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.
- validationState
- ValidationStateDictionary
Oggetto ValidationStateDictionary.
- 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 è metadata
IsRequiredtrue
, 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.
- validationState
- ValidationStateDictionary
Oggetto ValidationStateDictionary.
- prefix
- String
Chiave del prefisso del modello.
- model
- Object
Oggetto del modello.
- metadata
- ModelMetadata
Oggetto ModelMetadata.
- container
- Object
Contenitore del modello