Class RegularExpressionPropertyValidator
Validates that properties matches the required regular expresssion pattern.
Inheritance
System.Object
RegularExpressionPropertyValidator
Namespace: EPiServer.Validation.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class RegularExpressionPropertyValidator : PropertyValidatorBase<RegularExpressionValidationSettings>, IValidate<IContentData>, IValidate
Constructors
RegularExpressionPropertyValidator(LocalizationService, IPropertyDefinitionRepository, IPropertyValidationSettingsRepository)
Initializes a new instance of the Regular
Declaration
public RegularExpressionPropertyValidator(LocalizationService localizationService, IPropertyDefinitionRepository propertyDefinitionRepository, IPropertyValidationSettingsRepository validationSettingsRepository)
Parameters
Type | Name | Description |
---|---|---|
Localization |
localizationService | |
IProperty |
propertyDefinitionRepository | |
IProperty |
validationSettingsRepository |
Methods
CanHandle(PropertyData)
Declaration
protected override bool CanHandle(PropertyData property)
Parameters
Type | Name | Description |
---|---|---|
Property |
property |
Returns
Type | Description |
---|---|
System. |
Overrides
EPiServer.Validation.Internal.PropertyValidatorBase<EPiServer.Validation.RegularExpressionValidationSettings>.CanHandle(EPiServer.Core.PropertyData)
ErrorMessage(PropertyDefinition, PropertyData, RegularExpressionValidationSettings)
Declaration
protected override string ErrorMessage(PropertyDefinition propertyDefinition, PropertyData property, RegularExpressionValidationSettings settings)
Parameters
Type | Name | Description |
---|---|---|
Property |
propertyDefinition | |
Property |
property | |
Regular |
settings |
Returns
Type | Description |
---|---|
System. |
Overrides
EPiServer.Validation.Internal.PropertyValidatorBase<EPiServer.Validation.RegularExpressionValidationSettings>.ErrorMessage(EPiServer.DataAbstraction.PropertyDefinition, EPiServer.Core.PropertyData, EPiServer.Validation.RegularExpressionValidationSettings)
IsValid(PropertyData, RegularExpressionValidationSettings)
Declaration
protected override bool IsValid(PropertyData property, RegularExpressionValidationSettings settings)
Parameters
Type | Name | Description |
---|---|---|
Property |
property | |
Regular |
settings |
Returns
Type | Description |
---|---|
System. |
Overrides
EPiServer.Validation.Internal.PropertyValidatorBase<EPiServer.Validation.RegularExpressionValidationSettings>.IsValid(EPiServer.Core.PropertyData, EPiServer.Validation.RegularExpressionValidationSettings)