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

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 IPropertyValidationSettings.

Namespace: EPiServer.Validation
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public interface IPropertyValidationSettingsRepository

Methods

Add(PropertyDefinition, IPropertyValidationSettings)

Declaration
void Add(PropertyDefinition propertyDefinition, IPropertyValidationSettings setting)
Parameters
Type Name Description
PropertyDefinition propertyDefinition

The property definition to add a validation settings for.

IPropertyValidationSettings 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 IPropertyValidationSettings that should be assigned to a specific PropertyDefinition.

Declaration
void Assign(PropertyDefinition propertyDefinition, IEnumerable<IPropertyValidationSettings> settings)
Parameters
Type Name Description
PropertyDefinition propertyDefinition

The property definition to assign validation settings for.

System.Collections.Generic.IEnumerable<IPropertyValidationSettings> 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
PropertyDefinition propertyDefinition

The property definition to clear all validation settings for.

List(PropertyDefinition)

List all IPropertyValidationSettings assigned to a specific PropertyDefinition.

Declaration
IEnumerable<IPropertyValidationSettings> List(PropertyDefinition propertyDefinition)
Parameters
Type Name Description
PropertyDefinition propertyDefinition

The property definition to get validation settings for.

Returns
Type Description
System.Collections.Generic.IEnumerable<IPropertyValidationSettings>

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
PropertyDefinition propertyDefinition

The property definition to remove a validation settings for.

System.Type settingsType

The type of the validation settings that should be removed.

Extension Methods