November Happy Hour will be moved to Thursday December 5th.

Class GreaterThanAttribute

Serves as the class for compare value field validation attributes.

Inheritance
System.Object
GreaterThanAttribute
Namespace: EPiServer.Commerce.Catalog.DataAnnotations
Assembly: EPiServer.Business.Commerce.dll
Version: 12.17.2
Syntax
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class GreaterThanAttribute : ValidationAttribute

Constructors

GreaterThanAttribute()

Declaration
public GreaterThanAttribute()

Properties

LocalizationService

The localization service.

Declaration
public LocalizationService LocalizationService { get; set; }
Property Value
Type Description
EPiServer.Framework.Localization.LocalizationService

TargetProperty

The property to validate against.

Declaration
public string TargetProperty { get; set; }
Property Value
Type Description
System.String

Methods

IsValid(Object, ValidationContext)

Determines whether the specified value of the object is valid.

Declaration
protected override ValidationResult IsValid(object value, ValidationContext context)
Parameters
Type Name Description
System.Object value

The value of the object to validate.

System.ComponentModel.DataAnnotations.ValidationContext context

The validation context.

Returns
Type Description
System.ComponentModel.DataAnnotations.ValidationResult

return ValidationResult.Success if valid, otherwise return ValidationResult with ErrorMessage.