Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Class PositiveNumberAttribute

Serves as the class for non negative number validation attributes.

Inheritance
System.Object
PositiveNumberAttribute
Namespace: EPiServer.Commerce.Catalog.DataAnnotations
Assembly: EPiServer.Business.Commerce.dll
Version: 14.26.0
Syntax
public class PositiveNumberAttribute : ValidationAttribute

Constructors

PositiveNumberAttribute()

Declaration
public PositiveNumberAttribute()

PositiveNumberAttribute(LocalizationService)

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

Methods

IsValid(Object)

Determines whether the specified value of the object is a positive decimal.

Declaration
public override bool IsValid(object value)
Parameters
Type Name Description
System.Object value

The value of the object to validate.

Returns
Type Description
System.Boolean

true if the specified value is valid; otherwise, false.