• Not Answered

How to allow Item name to be in lowercase only and no special characters other than (-) should be allowed?

I have a requirement in which :


  1. Item names shouldn't have any special characters except for hyphens (-)
  2. Item names should all be lowercase


What regex values need to be added or removed from the properties "InvalidItemNameChars" or "ItemNameValidation" present in Sitecore.config. Their default values are as given below.


Characters that are invalid in an item name
<setting name="InvalidItemNameChars" value="\/:?&quot;&lt;&gt;|[]"/>
Regular expression for validating item names
<setting name="ItemNameValidation" value="^[\w\*\$][\w\s\-\$]*(\(\d{1,}\)){0,1}$"/>


Or is there any other way to achieve the requirement ?

4 Replies