DefaultModelBinder.IsModelValid(ModelBindingContext) Method

Definition

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

protected static bool IsModelValid (System.Web.Mvc.ModelBindingContext bindingContext);
static member IsModelValid : System.Web.Mvc.ModelBindingContext -> bool
Protected Shared Function IsModelValid (bindingContext As ModelBindingContext) As Boolean

Parameters

bindingContext
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.

Returns

true if the model is valid; otherwise, false.

Exceptions

The bindingContext parameter is null.

Applies to