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 BuyQuantityGetFreeItemsValidator

Validates conditions for the BuyQuantityGetFreeItems promotion.

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

Constructors

BuyQuantityGetFreeItemsValidator(LocalizationService)

Initializes a new instance of the BuyQuantityGetFreeItemsValidator class.

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

The localization service.

Methods

AddErrorsIfNeeded(BuyQuantityGetFreeItems, List<ValidationError>)

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

Implements

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