DataAnnotationsModelValidator<TAttribute> DataAnnotationsModelValidator<TAttribute> 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>DataAnnotationsModelValidator<TAttribute>DataAnnotationsModelValidator<TAttribute>
Derived

Constructors

DataAnnotationsModelValidator<TAttribute>(ModelMetadata, ControllerContext, TAttribute) DataAnnotationsModelValidator<TAttribute>(ModelMetadata, ControllerContext, TAttribute) DataAnnotationsModelValidator<TAttribute>(ModelMetadata, ControllerContext, TAttribute)

Initializes a new instance of the DataAnnotationsModelValidator class.

Properties

Attribute Attribute Attribute

Gets the validation attribute from the model validator.

ControllerContext ControllerContext ControllerContext

Gets the controller context.

(Inherited from ModelValidator)
ErrorMessage ErrorMessage ErrorMessage

Gets the error message for the validation failure.

(Inherited from DataAnnotationsModelValidator)
IsRequired IsRequired IsRequired

Gets a value that indicates whether model validation is required.

(Inherited from DataAnnotationsModelValidator)
Metadata Metadata Metadata

Gets the metadata for the model validator.

(Inherited from ModelValidator)

Methods

GetClientValidationRules() GetClientValidationRules() GetClientValidationRules()

Retrieves a collection of client validation rules.

(Inherited from DataAnnotationsModelValidator)
Validate(Object) Validate(Object) Validate(Object)

Returns a list of validation error messages for the model.

(Inherited from DataAnnotationsModelValidator)

Applies to