Export (0) Print
Expand All

DataAnnotationsModelValidatorProvider Class

.NET Framework 4

Implements the default validation provider for MVC.

System.Object
  System.Web.Mvc.ModelValidatorProvider
    System.Web.Mvc.AssociatedValidatorProvider
      System.Web.Mvc.DataAnnotationsModelValidatorProvider

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

public class DataAnnotationsModelValidatorProvider : AssociatedValidatorProvider

The DataAnnotationsModelValidatorProvider type exposes the following members.

  NameDescription
Public methodDataAnnotationsModelValidatorProviderInitializes a new instance of the DataAnnotationsModelValidatorProvider class.
Top

  NameDescription
Public propertyStatic memberAddImplicitRequiredAttributeForValueTypesGets or sets a value that indicates whether non-nullable value types are required.
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 methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodGetTypeDescriptorGets a type descriptor for the specified type. (Inherited from AssociatedValidatorProvider.)
Public methodGetValidators(ModelMetadata, ControllerContext)Gets the validators for the model using the metadata and controller context. (Inherited from AssociatedValidatorProvider.)
Protected methodGetValidators(ModelMetadata, ControllerContext, IEnumerable<Attribute>)Gets a list of validators. (Overrides AssociatedValidatorProvider.GetValidators(ModelMetadata, ControllerContext, IEnumerable<Attribute>).)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberRegisterAdapterRegisters an adapter to provide client-side validation.
Public methodStatic memberRegisterAdapterFactoryRegisters an adapter factory for the validation provider.
Public methodStatic memberRegisterDefaultAdapterRegisters the default adapter.
Public methodStatic memberRegisterDefaultAdapterFactoryRegisters the default adapter factory.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

A validation provider provides validators for the data model.

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

Community Additions

ADD
Show:
© 2015 Microsoft