Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

How to limit number of elements in ILIST

$
0
0

I need to add only 4 elements in IList. How can I do that?

[CultureSpecific]
[Display(Name = "Items", GroupName = PropertyGroupNames.Content, Order = 20)]
[EditorDescriptor(EditorDescriptorType = typeof(AnswerListPropertyDescriptor))]

public virtual IList<AnswerBlock> Answers { get; set; }

I tried to use [MaxLength(4)] but its not working. Please help?


Viewing all articles
Browse latest Browse all 8020

Trending Articles