DefaultModelBinder.IsModelValid Method

Determines whether a data model is valid for the specified binding context.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

'Declaration
Protected Shared Function IsModelValid ( _
	bindingContext As ModelBindingContext _
) As Boolean
'Usage
Dim bindingContext As ModelBindingContext 
Dim returnValue As Boolean 

returnValue = DefaultModelBinder.IsModelValid(bindingContext)

Parameters

bindingContext
Type: System.Web.Mvc.ModelBindingContext
The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider.

Return Value

Type: System.Boolean
true if the model is valid; otherwise, false.

ExceptionCondition
ArgumentNullException

The bindingContext parameter is Nothing.

Show: