Reputation: 4855
I would like to be able to:
Name items with any or all of the following:
I have added the following two lines to the <encodeNameReplacements>
node:
<replace mode="on" find=" " replaceWith="-"/>
<replace mode="on" find="_" replaceWith="-" />
I have updated the to have the following value:
\/:?"<>|[]-_
Do I need to update the <setting name="ItemNameValidation">
too?
What would be the correct regex to use for the above scenario? I tried tinkering with it, and well let's just say something isn't right.
Upvotes: 2
Views: 240
Reputation: 4456
Yes I would update the ItemNameValidation
setting.
I think this pattern should meet your requirements:
^[A-Za-z0-9 ]+$
It specifies that the string should be composed of one or more of any of the following:
Just in case there's some confusion, encodeNameReplacements
is not relevant to item naming. It's for the generation of URL's
Upvotes: 5