Redigera

Dela via


DataAnnotationsModelValidatorProvider Class

Definition

Implements the default validator provider.

public ref class DataAnnotationsModelValidatorProvider : System::Web::ModelBinding::AssociatedValidatorProvider
public class DataAnnotationsModelValidatorProvider : System.Web.ModelBinding.AssociatedValidatorProvider
type DataAnnotationsModelValidatorProvider = class
    inherit AssociatedValidatorProvider
Public Class DataAnnotationsModelValidatorProvider
Inherits AssociatedValidatorProvider
Inheritance
DataAnnotationsModelValidatorProvider

Remarks

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.

Constructors

DataAnnotationsModelValidatorProvider()

Initializes a new instance of the DataAnnotationsModelValidatorProvider class.

Properties

AddImplicitRequiredAttributeForValueTypes

Gets or sets a value that indicates whether non-nullable value types are required.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetTypeDescriptor(Type)

Gets a type descriptor for the specified type.

(Inherited from AssociatedValidatorProvider)
GetValidators(ModelMetadata, ModelBindingExecutionContext, IEnumerable<Attribute>)

Gets a collection of validators for the model.

GetValidators(ModelMetadata, ModelBindingExecutionContext)

Gets the validators for the model using the specified metadata and execution context.

(Inherited from AssociatedValidatorProvider)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RegisterAdapter(Type, Type)

Registers an adapter for client-side validation.

RegisterAdapterFactory(Type, DataAnnotationsModelValidationFactory)

Registers an adapter factory for the validation provider.

RegisterDefaultAdapter(Type)

Registers the default adapter.

RegisterDefaultAdapterFactory(DataAnnotationsModelValidationFactory)

Registers the default adapter factory.

RegisterDefaultValidatableObjectAdapter(Type)

Registers an adapter for default object validation.

RegisterDefaultValidatableObjectAdapterFactory(DataAnnotationsValidatableObjectAdapterFactory)

Registers an adapter factory for the default object validation provider.

RegisterValidatableObjectAdapter(Type, Type)

Registers an adapter for object validation.

RegisterValidatableObjectAdapterFactory(Type, DataAnnotationsValidatableObjectAdapterFactory)

Registers an adapter factory for the object validation provider.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to