Hi there, I'm using the CQ5.6.1 and try to create a component config dialog with a "pathfield" item,
I configured "regex" & "regexText" for this pathfield for the validation purpose, however when I saved code change
and tried to update&save this pathfield, I got a JS error "Uncaught TypeError: undefined is not a function".
Then I checked the JS source code, seems related with the following code section from libs/cq/ui/widgets.min.js:
-----------------------------
if (this.regex && !this.regex.test(a)) {
g.push(this.regexText)
}
return g
-----------------------------
With the debug info I found the regex is String instead of RegExp object, so caused ".test" method with "undefined" error.
It should be a defect, please take a look and give a fix patch for the later release.
Regards.
Solved! Go to Solution.
Views
Replies
Total Likes
regexText would be String for everything apart from xtype:textfield in extJS
I found this to customize the validate method here. please check if this helps [1]
[1] http://stackoverflow.com/questions/26974184/cq-custom-widget-for-text-link-checkbox-in-multifield
Views
Replies
Total Likes
regexText would be String for everything apart from xtype:textfield in extJS
I found this to customize the validate method here. please check if this helps [1]
[1] http://stackoverflow.com/questions/26974184/cq-custom-widget-for-text-link-checkbox-in-multifield
Views
Replies
Total Likes
In your regular expression you might be missing slash. Validate your expression.
Views
Replies
Total Likes
I do added "/" at the start and end of the regex, seems the problem is regex is parsed as String instead of RegExp object.
Views
Replies
Total Likes