Expand my Community achievements bar.

CQ 5.6.1 pathfield regex not working

Avatar

Level 2

 Hi 

 

I followed this article https://helpx.adobe.com/experience-manager/kb/creating-cq-widget-supports-image.html to create a custom component, when I choose the path and click ok button, i receive the error below in js console

widgets.js:86155 Uncaught TypeError: this.regex.test is not a function

Is regex supported for pathfield?

 

Thanks, 

2 Replies

Avatar

Level 2

I am a newbie in CQ, is it a known issue in 5.6.1?

 

Any hints would be appreciated. 

 

Thanks

Avatar

Administrator

Can you please share with us what regex are you using.

If the syntax of your regex seems to use forward slashes (/)  my guess is you should escape them twice like this: '\\/' instead of '/'. 

Reference link:- http://stackoverflow.com/questions/30760629/setting-regular-expression-to-validate-url-format-in-ado...

 

If the problem coming from a field in dialog tab, then it is known bug in 5.6.1 Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

I hope this would help you.

~kautuk



Kautuk Sahni