Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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, 

0 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