Class PropertyValidatorBase<TSettings>
Inheritance
System.Object
PropertyValidatorBase<TSettings>
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public abstract class PropertyValidatorBase<TSettings> : Object, IValidate<IContentData>, IValidate where TSettings : IPropertyValidationSettings
Type Parameters
Constructors
PropertyValidatorBase(IPropertyDefinitionRepository, IPropertyValidationSettingsRepository)
Declaration
protected PropertyValidatorBase(IPropertyDefinitionRepository propertyDefinitionRepository, IPropertyValidationSettingsRepository validationSettingsRepository)
Parameters
Methods
CanHandle(PropertyData)
Checks if the validator applies to this property.
Declaration
protected abstract bool CanHandle(PropertyData property)
Parameters
Returns
Type |
Description |
System.Boolean |
|
ErrorMessage(PropertyDefinition, PropertyData, TSettings)
Returns an error message that describes the validation error.
Declaration
protected abstract string ErrorMessage(PropertyDefinition propertyDefinition, PropertyData property, TSettings settings)
Parameters
Returns
Type |
Description |
System.String |
|
IsValid(PropertyData, TSettings)
Checks if the property is valid according to the provided settings.
Declaration
protected abstract bool IsValid(PropertyData property, TSettings settings)
Parameters
Type |
Name |
Description |
PropertyData |
property |
|
TSettings |
settings |
|
Returns
Type |
Description |
System.Boolean |
|
Validate(IContentData)
Declaration
public IEnumerable<ValidationError> Validate(IContentData instance)
Parameters
Returns
Implements
Extension Methods