London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

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: 13.30.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