Compartir a través de


ControllerBase.TryValidateModel Método

Definición

Sobrecargas

TryValidateModel(Object)

Valida la instancia especificada model .

TryValidateModel(Object, String)

Valida la instancia especificada model .

TryValidateModel(Object)

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

Valida la instancia especificada 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

Parámetros

model
Object

Modelo que se va a validar.

Devoluciones

true es si es ModelState válido; false en caso contrario.

Atributos

Se aplica a

TryValidateModel(Object, String)

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

Valida la instancia especificada 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

Parámetros

model
Object

Modelo que se va a validar.

prefix
String

Clave que se va a usar al buscar información en ModelState.

Devoluciones

true es si es ModelState válido;false en caso contrario.

Atributos

Se aplica a