Try our conversational search powered by Generative AI!

Class ItemStringLengthAttribute

Specifies the minimum and maximum length of characters that are allowed for each item in a content list property.

Inheritance
System.Object
ItemStringLengthAttribute
Namespace: EPiServer.DataAnnotations
Assembly: EPiServer.Framework.dll
Version: 11.20.7
Syntax
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class ItemStringLengthAttribute : StringLengthAttribute

Constructors

ItemStringLengthAttribute(Int32)

Initializes a new instance of the ItemStringLengthAttribute class.

Declaration
public ItemStringLengthAttribute(int maximumLength)
Parameters
Type Name Description
System.Int32 maximumLength

The maximum string length of a each item in the list.

Methods

IsValid(Object)

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

Extension Methods