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 CampaignDateValidator

Validates that valid from date on a campaign is not greater than valid until date.

Inheritance
System.Object
CampaignDateValidator
Implements
EPiServer.Validation.IValidate<SalesCampaign>
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 CampaignDateValidator : IValidate<SalesCampaign>, IValidate

Constructors

CampaignDateValidator(LocalizationService)

Initializes a new instance of the CampaignDateValidator class.

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

The localization service.

Methods

Validate(SalesCampaign)

Validates the specified campaign.

Declaration
public IEnumerable<ValidationError> Validate(SalesCampaign campaign)
Parameters
Type Name Description
SalesCampaign campaign

The campaign that will be validated.

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

A validation warning if the valid from date is greater than the valid until date. Validation errors if either from or until dates are empty.

Implements

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