Web developers wiki ASP.NET Sitecore Sharepoint Kentico by Evident Interactive

Limiting selection on multilist or treelist

Modified: 2008/10/03 17:04 by Vincevanm - Categorized as: Sitecore
Example: You want to have a maximum of three selections in a MultiList field.

Set the following Regular Expression in the "Validation" field of the Sitecore field (found in the template):


This expression checks if there are valid GUIDS seperated by "|" characters. The {0,4} part defines how much items can be selected. In this case: no selection is allowed and a maximum of four items can be selected.

Alternative expression: ^(\*\}\|\{\*){0,3}$

 © Evident Interactive BV