Export (0) Print
Expand All

DataAnnotationsModelValidatorProvider Class

.NET Framework 4.5

Implements the default validator provider.

Namespace:  System.Web.ModelBinding
Assembly:  System.Web (in System.Web.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 methodEquals(Object)Determines 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 the default hash function. (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, ModelBindingExecutionContext)Gets the validators for the model using the specified metadata and execution context. (Inherited from AssociatedValidatorProvider.)
Protected methodGetValidators(ModelMetadata, ModelBindingExecutionContext, IEnumerable<Attribute>)Gets a collection of validators for the model. (Overrides AssociatedValidatorProvider.GetValidators(ModelMetadata, ModelBindingExecutionContext, IEnumerable<Attribute>).)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberRegisterAdapterRegisters an adapter for 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 methodStatic memberRegisterDefaultValidatableObjectAdapterRegisters an adapter for default object validation.
Public methodStatic memberRegisterDefaultValidatableObjectAdapterFactoryRegisters an adapter factory for the default object validation provider.
Public methodStatic memberRegisterValidatableObjectAdapterRegisters an adapter for object validation.
Public methodStatic memberRegisterValidatableObjectAdapterFactoryRegisters an adapter factory for the object validation provider.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

This class is an implementation of ModelValidatorProvider that provides validators for attributes that derive from ValidationAttribute. It also provides validators for types that implement IValidatableObject.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

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