EmptyModelValidatorProvider Class (System.Web.Mvc)

Switch View :
ScriptFree
.NET Framework Class Library
EmptyModelValidatorProvider Class

Provides an empty validation provider for models that do not require a validator.

Inheritance Hierarchy

System.Object
  System.Web.Mvc.ModelValidatorProvider
    System.Web.Mvc.EmptyModelValidatorProvider

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

Visual Basic (Declaration)
Public Class EmptyModelValidatorProvider _
	Inherits ModelValidatorProvider
Visual Basic (Usage)
Dim instance As EmptyModelValidatorProvider
C#
public class EmptyModelValidatorProvider : ModelValidatorProvider
Visual C++
public ref class EmptyModelValidatorProvider : public ModelValidatorProvider
JScript
public class EmptyModelValidatorProvider extends ModelValidatorProvider

The EmptyModelValidatorProvider type exposes the following members.

Constructors

  Name Description
Public method EmptyModelValidatorProvider Initializes a new instance of the EmptyModelValidatorProvider class.
Top
Methods

  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method GetValidators Gets the empty model validator. (Overrides ModelValidatorProvider.GetValidators(ModelMetadata, ControllerContext).)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)
Top
Remarks

MVC requires that models have a validation provider. In order to satisfy this requirement, set Current to null to set the current model validator provider to the EmptyModelValidatorProvider provider.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also

Reference