A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Class BuyFromCategoryGetItemDiscountValidator

Validates conditions for the BuyFromCategoryGetItemDiscount promotion.

Inheritance
System.Object
BuyFromCategoryGetItemDiscountValidator
Implements
EPiServer.Validation.IValidate<BuyFromCategoryGetItemDiscount>
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 BuyFromCategoryGetItemDiscountValidator : PromotionDataValidatorBase<BuyFromCategoryGetItemDiscount>, IValidate<BuyFromCategoryGetItemDiscount>, IValidate

Constructors

BuyFromCategoryGetItemDiscountValidator(LocalizationService)

Initializes a new instance of the BuyFromCategoryGetItemDiscount class.

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

The localization service.

Methods

AddErrorsIfNeeded(BuyFromCategoryGetItemDiscount, List<ValidationError>)

Declaration
protected override void AddErrorsIfNeeded(BuyFromCategoryGetItemDiscount promotionData, List<ValidationError> validationErrors)
Parameters
Type Name Description
BuyFromCategoryGetItemDiscount promotionData
System.Collections.Generic.List<EPiServer.Validation.ValidationError> validationErrors
Overrides
EPiServer.Commerce.Validation.PromotionDataValidatorBase<EPiServer.Commerce.Marketing.Promotions.BuyFromCategoryGetItemDiscount>.AddErrorsIfNeeded(EPiServer.Commerce.Marketing.Promotions.BuyFromCategoryGetItemDiscount, System.Collections.Generic.List<EPiServer.Validation.ValidationError>)

Implements

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