SaaS CMS has officially launched! Learn more now.

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: 11.8.3
Syntax
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class PositiveNumberAttribute : ValidationAttribute

Constructors

PositiveNumberAttribute()

Declaration
public PositiveNumberAttribute()

Methods

IsValid(Object)

Determines whether the specified value of the object is valid.

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.