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 RegularExpressionPropertyValidator class.
Declaration
public RegularExpressionPropertyValidator(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.RegularExpressionValidationSettings>.CanHandle(EPiServer.Core.PropertyData)
ErrorMessage(PropertyDefinition, PropertyData, RegularExpressionValidationSettings)
Declaration
protected override string ErrorMessage(PropertyDefinition propertyDefinition, PropertyData property, RegularExpressionValidationSettings settings)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinition | propertyDefinition | |
PropertyData | property | |
RegularExpressionValidationSettings | settings |
Returns
Type | Description |
---|---|
System.String |
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 |
---|---|---|
PropertyData | property | |
RegularExpressionValidationSettings | settings |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
EPiServer.Validation.Internal.PropertyValidatorBase<EPiServer.Validation.RegularExpressionValidationSettings>.IsValid(EPiServer.Core.PropertyData, EPiServer.Validation.RegularExpressionValidationSettings)