Controller.TryValidateModel Controller.TryValidateModel Controller.TryValidateModel Method

Definition

Overloads

TryValidateModel(Object, String) TryValidateModel(Object, String) TryValidateModel(Object, String)

Validates the specified model instance using an HTML prefix.

TryValidateModel(Object) TryValidateModel(Object) TryValidateModel(Object)

Validates the specified model instance.

TryValidateModel(Object, String) TryValidateModel(Object, String) 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 Object Object

The model to validate.

prefix
String String String

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

Returns

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

TryValidateModel(Object) TryValidateModel(Object) 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 Object Object

The model to validate.

Returns

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

Applies to