While creating Item all types of special characters should be allowed. I tried to alter the regular expression in sitecore.config but unable to resolve it
<setting name="ItemNameValidation" value="^[\w\*\$][\w\s\-\$]*(\(\d{1,}\)){0,1}$"/>
While creating Item all types of special characters should be allowed. I tried to alter the regular expression in sitecore.config but unable to resolve it
<setting name="ItemNameValidation" value="^[\w\*\$][\w\s\-\$]*(\(\d{1,}\)){0,1}$"/>
If you would like to allow all chars in items names in Sitecore you could use this patch:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<settings>
<setting name="ItemNameValidation">
<patch:attribute name="value">^.*$</patch:attribute>
</setting>
</settings>
</sitecore>
</configuration>
Regex explanation:
^ asserts position at start of the string
.* matches any character (except for line terminators)
* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
$ asserts position at the end of the string, or before the line terminator right at the end of the string (if any)
Parser Error Message: 'patch' is an undeclared prefix. Line 3061, position 6.
Commented
Nov 2, 2017 at 12:55
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
. I have updated the answer with a complete config file.
Commented
Nov 2, 2017 at 13:08