Interface IPropertyValidationSettingsRepository
NOTE: This is a pre-release API that is UNSTABLE and might not satisfy the compatibility requirements as denoted by its associated normal version.
Repository for working with IProperty
Namespace: EPiServer.Validation
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public interface IPropertyValidationSettingsRepository
Methods
Add(PropertyDefinition, IPropertyValidationSettings)
Adds a IProperty
Declaration
void Add(PropertyDefinition propertyDefinition, IPropertyValidationSettings setting)
Parameters
Type | Name | Description |
---|---|---|
Property |
propertyDefinition | The property definition to add a validation settings for. |
IProperty |
setting | The validation setting to add. |
Remarks
If an existing setting of the same type already exists, it will be overridden as only one validation settings instance per type can be stored.
Assign(PropertyDefinition, IEnumerable<IPropertyValidationSettings>)
Assign a list of IProperty
Declaration
void Assign(PropertyDefinition propertyDefinition, IEnumerable<IPropertyValidationSettings> settings)
Parameters
Type | Name | Description |
---|---|---|
Property |
propertyDefinition | The property definition to assign validation settings for. |
System. |
settings | The validation settings to assign to the property. |
Remarks
Any existing validation settings for that property definition will be removed.
Clear(PropertyDefinition)
Removes all registered validation settings for the provided property.
Declaration
void Clear(PropertyDefinition propertyDefinition)
Parameters
Type | Name | Description |
---|---|---|
Property |
propertyDefinition | The property definition to clear all validation settings for. |
List(PropertyDefinition)
List all IProperty
Declaration
IEnumerable<IPropertyValidationSettings> List(PropertyDefinition propertyDefinition)
Parameters
Type | Name | Description |
---|---|---|
Property |
propertyDefinition | The property definition to get validation settings for. |
Returns
Type | Description |
---|---|
System. |
A list of validation settings. |
Remove(PropertyDefinition, Type)
Removes any registered validation settings of the provided settings type for the specified property.
Declaration
void Remove(PropertyDefinition propertyDefinition, Type settingsType)
Parameters
Type | Name | Description |
---|---|---|
Property |
propertyDefinition | The property definition to remove a validation settings for. |
System. |
settingsType | The type of the validation settings that should be removed. |