C# Class ExpressiveAnnotations.MvcUnobtrusive.Providers.ExpressiveAnnotationsModelValidatorProvider

Data annotations validator provider which automatically registers adapters for expressive validation attributes, i.e. ExpressiveAttribute, and additionally respects their processing priorities (if ExpressiveAttribute.Priority is specified) when validation is executed.
Attributes with highest priority (lowest value) will be processed in first place. Attributes without explicitly proivided priorities will be processed later, without any specific order.
Inheritance: System.Web.Mvc.DataAnnotationsModelValidatorProvider
Show file Open project: jwaliszko/ExpressiveAnnotations Class Usage Examples

Public Methods

Method Description
ExpressiveAnnotationsModelValidatorProvider ( ) : System

Initializes a new instance of the ExpressiveAnnotationsModelValidatorProvider class.

Protected Methods

Method Description
GetValidators ( ModelMetadata metadata, System.Web.Mvc.ControllerContext context, IEnumerable attributes ) : IEnumerable

Gets a list of validators.

Method Details

ExpressiveAnnotationsModelValidatorProvider() public method

Initializes a new instance of the ExpressiveAnnotationsModelValidatorProvider class.
public ExpressiveAnnotationsModelValidatorProvider ( ) : System
return System

GetValidators() protected method

Gets a list of validators.
protected GetValidators ( ModelMetadata metadata, System.Web.Mvc.ControllerContext context, IEnumerable attributes ) : IEnumerable
metadata ModelMetadata The metadata.
context System.Web.Mvc.ControllerContext The context.
attributes IEnumerable The list of validation attributes.
return IEnumerable