Class ListItemsAttribute
Specifies the minimum and maximum number of items allowed in a content list property.
Inheritance
System.Object
ListItemsAttribute
Namespace: EPiServer.DataAnnotations
Assembly: EPiServer.Framework.dll
Version: 11.20.7Syntax
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class ListItemsAttribute : ValidationAttribute
Constructors
ListItemsAttribute(Int32)
Initializes a new instance of the ListItemsAttribute class.
Declaration
public ListItemsAttribute(int maximum)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maximum | The maximum number of items allowed in the list. |
ListItemsAttribute(Int32, Int32)
Initializes a new instance of the ListItemsAttribute class.
Declaration
public ListItemsAttribute(int minimum, int maximum)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | minimum | The minimum number of items allowed in the list. |
System.Int32 | maximum | The maximum number of items allowed in the list. |
Properties
Maximum
Gets the maximum number of items allowed in the list.
Declaration
public int Maximum { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Minimum
Gets the minimum number of items allowed in the list.
Declaration
public int Minimum { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
IsValid(Object)
Declaration
public override bool IsValid(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value |
Returns
Type | Description |
---|---|
System.Boolean |