Partager via


ValidationVisitor.Validate Méthode

Définition

Surcharges

Validate(ModelMetadata, String, Object)

Valide un objet.

Validate(ModelMetadata, String, Object, Boolean)

Valide un objet.

Validate(ModelMetadata, String, Object, Boolean, Object)

Valide un objet.

Validate(ModelMetadata, String, Object)

Source:
ValidationVisitor.cs
Source:
ValidationVisitor.cs
Source:
ValidationVisitor.cs

Valide un objet.

public:
 bool Validate(Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, System::String ^ key, System::Object ^ model);
public bool Validate (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model);
member this.Validate : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * string * obj -> bool
Public Function Validate (metadata As ModelMetadata, key As String, model As Object) As Boolean

Paramètres

metadata
ModelMetadata

ModelMetadata associé au modèle.

key
String

Clé de préfixe de modèle.

model
Object

Objet du modèle.

Retours

true si l’objet est valide, sinon false.

S’applique à

Validate(ModelMetadata, String, Object, Boolean)

Source:
ValidationVisitor.cs
Source:
ValidationVisitor.cs
Source:
ValidationVisitor.cs

Valide un objet.

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

Paramètres

metadata
ModelMetadata

ModelMetadata associé au modèle.

key
String

Clé de préfixe de modèle.

model
Object

Objet du modèle.

alwaysValidateAtTopLevel
Boolean

Si true, applique des règles de validation même si la valeur de niveau supérieur est null.

Retours

true si l’objet est valide, sinon false.

S’applique à

Validate(ModelMetadata, String, Object, Boolean, Object)

Source:
ValidationVisitor.cs

Valide un objet.

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

Paramètres

metadata
ModelMetadata

ModelMetadata associé au modèle.

key
String

Clé de préfixe de modèle.

model
Object

Objet du modèle.

alwaysValidateAtTopLevel
Boolean

Si true, applique des règles de validation même si la valeur de niveau supérieur est null.

container
Object

Conteneur de modèle.

Retours

true si l’objet est valide, sinon false.

S’applique à