Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ModelValidator Class

.NET Framework 4

Provides a base class for implementing validation logic.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)
public abstract class ModelValidator

The ModelValidator type exposes the following members.

  NameDescription
Protected methodModelValidatorCalled from constructors in derived classes to initialize the ModelValidator class.
Top
  NameDescription
Protected propertyControllerContextGets the controller context.
Public propertyIsRequiredGets or sets a value that indicates whether a model property is required.
Protected propertyMetadataGets the metadata for the model validator.
Top
  NameDescription
Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetClientValidationRulesWhen implemented in a derived class, returns metadata for client validation.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodStatic memberGetModelValidatorReturns a composite model validator for the model.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodValidateWhen implemented in a derived class, validates the object.
Top
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.