Class ContentDataAnnotationsValidator
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Validates the IContentData instance against attributes inheriting System.ComponentModel.DataAnnotations.ValidationAttribute.
Inherited Members
Namespace: EPiServer.Validation.Internal
Assembly: EPiServer.dll
Version: 10.10.4Syntax
[ServiceConfiguration]
public class ContentDataAnnotationsValidator : DataAnnotationsValidator<IContentData>, IValidate<IContentData>, IValidate
Remarks
Validation will not be performed against System.ComponentModel.DataAnnotations.RequiredAttribute since that is done through RequiredPropertyValidator
Constructors
ContentDataAnnotationsValidator(LocalizationService, IContentTypeRepository)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the ContentDataAnnotationsValidator class.
Declaration
public ContentDataAnnotationsValidator(LocalizationService localizationService, IContentTypeRepository contentTypeRepository)
Parameters
| Type | Name | Description |
|---|---|---|
| LocalizationService | localizationService | The localization service. |
| IContentTypeRepository | contentTypeRepository | The content type repository |
Properties
IgnoredAttributes
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the ignored attributes.
Declaration
public override IEnumerable<Type> IgnoredAttributes { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<System.Type> | The ignored attributes. |
Overrides
Remarks
Returns System.ComponentModel.DataAnnotations.RequiredAttribute
Methods
GetDisplayName(PropertyDescriptor, Object)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the display name for the propertyDescriptor on the content type of the instance.
Declaration
protected override string GetDisplayName(PropertyDescriptor propertyDescriptor, object instance)
Parameters
| Type | Name | Description |
|---|---|---|
| System.ComponentModel.PropertyDescriptor | propertyDescriptor | The property to get the display name for. |
| System.Object | instance | The object instance that |
Returns
| Type | Description |
|---|---|
| System.String | A translated display name if any translation exists. |