I'd like to only allow lowercase letters to this field. Is there a way add this or change the validation regular expression?
The field has some validation, but I can't find where this is set.
The field checks on spaces and wierd characters, but not uppercase letters.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @RickSnac
The Validator is from OOTB clienlibs i.e. /libs/cq/gui/components/siteadmin/admin/clientlibs/validations
but you can't change this, however you can have additional Custom Validator using clientlibs with category 'cq.sites.movepagewizard'
Hi @RickSnac
To write custom validation for Touch UI dialog fields the recommended approach is to use foundation validator validations. Please refer this document below to write a custom one. https://blogs.perficient.com/2017/11/06/aem-touch-ui-dialog-validation-new-best-practice-use-foundat...
And to know where the validation for your current field are written, you need to check the resoureceType of that field. For e.g If the field/widget is coming from /libs you should be able to find the validation script there. You might need to dig in a little to find the exact script.
Thanks.
Hi @RickSnac
The Validator is from OOTB clienlibs i.e. /libs/cq/gui/components/siteadmin/admin/clientlibs/validations
but you can't change this, however you can have additional Custom Validator using clientlibs with category 'cq.sites.movepagewizard'
Thanks for your great answer. I managed to fix the problem!
Something else turned up now. When content editors copy a page and paste afterwards they can enter a new page name (url path). This field also needs the same validation. Do I have to repeat everything for a different category? Something like 'cq.sites.movepagewizard'? Or is there a more obvious method?
Note: the label of the field is badly named imo, but it sure is the url path the user can enter here.
Hi @RickSnac
Unfortunately, there is another place where autocorrection/validation is placed for copy/paste page
/libs/cq/gui/components/common/wcm/clientlibs/wcm/js/copy.js
Clientlibs details are at : /libs/cq/gui/components/common/wcm/clientlibs/wcm
Views
Likes
Replies
Views
Likes
Replies