Share via


Controller.TryValidateModel Method

Definition

Overloads

TryValidateModel(Object, String)

Validates the specified model instance using an HTML prefix.

TryValidateModel(Object)

Validates the specified model instance.

TryValidateModel(Object, String)

Validates the specified model instance using an HTML prefix.

protected internal bool TryValidateModel (object model, string prefix);
member this.TryValidateModel : obj * string -> bool
Protected Friend Function TryValidateModel (model As Object, prefix As String) As Boolean

Parameters

model
Object

The model to validate.

prefix
String

The prefix to use when looking up values in the model provider.

Returns

true if the model validation is successful; otherwise, false.

Applies to

TryValidateModel(Object)

Validates the specified model instance.

protected internal bool TryValidateModel (object model);
member this.TryValidateModel : obj -> bool
Protected Friend Function TryValidateModel (model As Object) As Boolean

Parameters

model
Object

The model to validate.

Returns

true if the model validation is successful; otherwise, false.

Applies to