Bagikan melalui


PageModel.TryValidateModel Metode

Definisi

Overload

TryValidateModel(Object)

Memvalidasi instans yang ditentukan model .

TryValidateModel(Object, String)

Memvalidasi instans yang ditentukan model .

TryValidateModel(Object)

Sumber:
PageModel.cs
Sumber:
PageModel.cs
Sumber:
PageModel.cs

Memvalidasi instans yang ditentukan model .

public:
 virtual bool TryValidateModel(System::Object ^ model);
public virtual bool TryValidateModel (object model);
abstract member TryValidateModel : obj -> bool
override this.TryValidateModel : obj -> bool
Public Overridable Function TryValidateModel (model As Object) As Boolean

Parameter

model
Object

Model untuk divalidasi.

Mengembalikan

true ModelState jika valid; false jika tidak.

Berlaku untuk

TryValidateModel(Object, String)

Sumber:
PageModel.cs
Sumber:
PageModel.cs
Sumber:
PageModel.cs

Memvalidasi instans yang ditentukan model .

public:
 virtual bool TryValidateModel(System::Object ^ model, System::String ^ name);
public virtual bool TryValidateModel (object model, string name);
public virtual bool TryValidateModel (object model, string? name);
abstract member TryValidateModel : obj * string -> bool
override this.TryValidateModel : obj * string -> bool
Public Overridable Function TryValidateModel (model As Object, name As String) As Boolean

Parameter

model
Object

Model untuk divalidasi.

name
String

Kunci yang digunakan saat mencari informasi di ModelState.

Mengembalikan

true ModelState jika valid;false jika tidak.

Berlaku untuk