November Happy Hour will be moved to Thursday December 5th.

Class LengthPropertyValidator

Validates that properties matches the required length requirements.

Inheritance
System.Object
LengthPropertyValidator
Namespace: EPiServer.Validation.Internal
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
[ServiceConfiguration]
public class LengthPropertyValidator : PropertyValidatorBase<LengthValidationSettings>, IValidate<IContentData>, IValidate

Constructors

LengthPropertyValidator(LocalizationService, IPropertyDefinitionRepository, IPropertyValidationSettingsRepository)

Declaration
public LengthPropertyValidator(LocalizationService localizationService, IPropertyDefinitionRepository propertyDefinitionRepository, IPropertyValidationSettingsRepository validationSettingsRepository)
Parameters
Type Name Description
LocalizationService localizationService
IPropertyDefinitionRepository propertyDefinitionRepository
IPropertyValidationSettingsRepository validationSettingsRepository

Methods

CanHandle(PropertyData)

Declaration
protected override bool CanHandle(PropertyData property)
Parameters
Type Name Description
PropertyData property
Returns
Type Description
System.Boolean
Overrides
EPiServer.Validation.Internal.PropertyValidatorBase<EPiServer.Validation.LengthValidationSettings>.CanHandle(EPiServer.Core.PropertyData)

ErrorMessage(PropertyDefinition, PropertyData, LengthValidationSettings)

Declaration
protected override string ErrorMessage(PropertyDefinition propertyDefinition, PropertyData property, LengthValidationSettings settings)
Parameters
Type Name Description
PropertyDefinition propertyDefinition
PropertyData property
LengthValidationSettings settings
Returns
Type Description
System.String
Overrides
EPiServer.Validation.Internal.PropertyValidatorBase<EPiServer.Validation.LengthValidationSettings>.ErrorMessage(EPiServer.DataAbstraction.PropertyDefinition, EPiServer.Core.PropertyData, EPiServer.Validation.LengthValidationSettings)

IsValid(PropertyData, LengthValidationSettings)

Declaration
protected override bool IsValid(PropertyData property, LengthValidationSettings settings)
Parameters
Type Name Description
PropertyData property
LengthValidationSettings settings
Returns
Type Description
System.Boolean
Overrides
EPiServer.Validation.Internal.PropertyValidatorBase<EPiServer.Validation.LengthValidationSettings>.IsValid(EPiServer.Core.PropertyData, EPiServer.Validation.LengthValidationSettings)

Implements

Extension Methods