0

I want to use the display name to generate my urls. That works so far, but I need to be shure, that the names has no vowels in it and so on. So I want to create a custom regex Validation rule that I can apply to the display name.

  1. I need to create my custom Regex Validation rule in the following path

    /sitecore/system/Settings/Validation Rules/Field Rules/Project/Common/Is Valid Display name
    

would this be a right naming or how are the helix rules here? I've a common project or should I create a custom feature for those validation rules ?

I also would add this Item path to my unicorn sync items for the common module

  1. I need to apply the Validation rule to the __Display name field under

    /sitecore/templates/System/Templates/Sections/Appearance/Appearance/__Display name
    

and add this '/sitecore/templates/System/Templates/Sections/Appearance/Appearance' path to my unicorn sync items. Is this the right approach or could this be a problem when I later try to upgrade my sitecore to a newer version? What should be the right way with Helix in Mind?

  1. I've found an alternate version, to just fill in the "Validation" and Validation Text" in the __Display name Item. So I don't need to create a custom Validator but I still need to sync this item with unicorn - perhaps this is also a valid solution?
0

My current Solution is the following, but I am not shure if this is the right way.

I've added only the display name Field to Unicorn sync in my Common Project

<include name="Project.Common.DisplayName" database="master" 
 path="/sitecore/templates/System/Templates/Sections/Appearance/Appearance/__Display name" />

And I've created also in my common project for unicorn sync for the custom Regex Validator the following rule

<include name="Project.Common.CustomValidations" database="master"
 path="/sitecore/system/Settings/Validation Rules/Field Rules/Project/Common" />

for my custom Regex Validator.

enter image description here

so far I've read my third solution with "Validation" and Validation Text" should not be used when you have the possiblity to create your own Validator, this should be the better solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.