DataAnnotationsModelValidator<TAttribute> Class

Definition

Provides a model validator for a specified validation type.

public class DataAnnotationsModelValidator<TAttribute> : System.Web.Mvc.DataAnnotationsModelValidator where TAttribute : ValidationAttribute
type DataAnnotationsModelValidator<'Attribute (requires 'Attribute :> ValidationAttribute)> = class
    inherit DataAnnotationsModelValidator
Public Class DataAnnotationsModelValidator(Of TAttribute)
Inherits DataAnnotationsModelValidator

Type Parameters

TAttribute
Inheritance
DataAnnotationsModelValidator<TAttribute>
Derived

Constructors

DataAnnotationsModelValidator<TAttribute>(ModelMetadata, ControllerContext, TAttribute)

Initializes a new instance of the DataAnnotationsModelValidator class.

Properties

Attribute

Gets the validation attribute from the model validator.

ControllerContext

Gets the controller context.

(Inherited from ModelValidator)
ErrorMessage

Gets the error message for the validation failure.

(Inherited from DataAnnotationsModelValidator)
IsRequired

Gets a value that indicates whether model validation is required.

(Inherited from DataAnnotationsModelValidator)
Metadata

Gets the metadata for the model validator.

(Inherited from ModelValidator)

Methods

GetClientValidationRules()

Retrieves a collection of client validation rules.

(Inherited from DataAnnotationsModelValidator)
Validate(Object)

Returns a list of validation error messages for the model.

(Inherited from DataAnnotationsModelValidator)

Applies to