Table of Contents

Class DataAnnotationsModelValidator<TAttribute>

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Provides a model validator for a specified validation type.

public class DataAnnotationsModelValidator<TAttribute> : DataAnnotationsModelValidator where TAttribute : ValidationAttribute

Type Parameters

TAttribute
Inheritance
DataAnnotationsModelValidator<TAttribute>
Derived
Inherited Members

Constructors

DataAnnotationsModelValidator(ModelMetadata, ControllerContext, TAttribute)

Initializes a new instance of the DataAnnotationsModelValidator class.

public DataAnnotationsModelValidator(ModelMetadata metadata, ControllerContext context, TAttribute attribute)

Parameters

metadata ModelMetadata

The metadata for the model.

context ControllerContext

The controller context for the model.

attribute TAttribute

The validation attribute for the model.

Properties

Attribute

Gets the validation attribute from the model validator.

protected TAttribute Attribute { get; }

Property Value

TAttribute

The validation attribute from the model validator.