Class CatalogDefaultLanguageValidator

Validates the DefaultLanguage against CatalogLanguages.

Inheritance
System.Object
CatalogDefaultLanguageValidator
Implements
EPiServer.Validation.IValidate<CatalogContent>
EPiServer.Validation.IValidate
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Validation
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
public class CatalogDefaultLanguageValidator : IValidate<CatalogContent>, IValidate

Constructors

CatalogDefaultLanguageValidator(LocalizationService)

Initializes a new instance of the CatalogDefaultLanguageValidator class.

Declaration
public CatalogDefaultLanguageValidator(LocalizationService localizationService)
Parameters
Type Name Description
EPiServer.Framework.Localization.LocalizationService localizationService

The localization service.

Methods

Validate(CatalogContent)

Validates the CatalogLanguages against DefaultLanguage on the instance.

Declaration
public IEnumerable<ValidationError> Validate(CatalogContent instance)
Parameters
Type Name Description
CatalogContent instance

The CatalogContent containing the CatalogLanguages and the DefaultLanguage.

Returns
Type Description
System.Collections.Generic.IEnumerable<EPiServer.Validation.ValidationError>

Error message if CatalogLanguages don't contain DefaultLanguage, otherwise an empty enumerable.

Implements

EPiServer.Validation.IValidate<>
EPiServer.Validation.IValidate