Class DataAnnotationsValidator<T>
Base class for validator classes that does validation against attributes specified in System.ComponentModel.DataAnnotations
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Validation
Assembly: EPiServer.Framework.dll
Version: 8.11.0Syntax
public abstract class DataAnnotationsValidator<T> : IValidate<T>, IValidate
Type Parameters
Name | Description |
---|---|
T |
Constructors
DataAnnotationsValidator()
Initializes a new instance of the DataAnnotationsValidator<T> class.
Declaration
protected DataAnnotationsValidator()
DataAnnotationsValidator(LocalizationService)
Declaration
protected DataAnnotationsValidator(LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
LocalizationService | localizationService |
Properties
IgnoredAttributes
Gets or sets attribute type that should not be part of validation.
Declaration
public virtual IEnumerable<Type> IgnoredAttributes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Type> | The ignored attributes. |
Remarks
Default implementation returns empty enumeration.
Methods
Validate(T)
Validates the specified instance.
Declaration
public virtual IEnumerable<ValidationError> Validate(T instance)
Parameters
Type | Name | Description |
---|---|---|
T | instance | The instance. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ValidationError> |