The default Sitecore Name Value List field has an annoying issue. It does not allow to use special characters like ‘-‘ for the key. I just digged into the Sitecore.Kernel library and I found a regular expression validation which is hardcoded.
Let’s overwrite this class make it more flexible. The main issue with the implementation that they don’t encode/decode the URI.
With the following class is the implementation of the new NameValueList field which allows you special characters:
To use this field you should add it to Sitecore to the following place in core database.
You also need to add the following to the Sitecore config to make this field used by the Sitecore field item.