Partager via


ControllerBase.TryValidateModel Méthode

Définition

Surcharges

TryValidateModel(Object)

Valide le instance spécifié model .

TryValidateModel(Object, String)

Valide le instance spécifié model .

TryValidateModel(Object)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

Valide le instance spécifié model .

public:
 virtual bool TryValidateModel(System::Object ^ model);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual bool TryValidateModel (object model);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member TryValidateModel : obj -> bool
override this.TryValidateModel : obj -> bool
Public Overridable Function TryValidateModel (model As Object) As Boolean

Paramètres

model
Object

Modèle à valider.

Retours

true si est ModelState valide ; false sinon.

Attributs

S’applique à

TryValidateModel(Object, String)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

Valide le instance spécifié model .

public:
 virtual bool TryValidateModel(System::Object ^ model, System::String ^ prefix);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual bool TryValidateModel (object model, string prefix);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual bool TryValidateModel (object model, string? prefix);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member TryValidateModel : obj * string -> bool
override this.TryValidateModel : obj * string -> bool
Public Overridable Function TryValidateModel (model As Object, prefix As String) As Boolean

Paramètres

model
Object

Modèle à valider.

prefix
String

Clé à utiliser lors de la recherche d’informations dans ModelState.

Retours

true si est ModelState valide ;false sinon.

Attributs

S’applique à