We have implemented both inline and on-submit validators in AEM 6.2
We are now facing an issue with Rich Text editors and validators.
Has anyone got this to work. We can validate multifields, text areas, text fields, on submit, radio buttons etc .... but have not been successful in implementing validators for Rich Text Editors.
References I've used to this point ...
http://keysandstrokes.info/aem-touch-ui-richtext-validations/
http://keysandstrokes.info/aem-6-2-touch-ui-validations/
Any help is appreciated.
Thanks,
-Dean
Views
Replies
Total Likes
We have a validating article - but its not a RTE:
http://scottsdigitalcommunity.blogspot.ca/2016/01/validating-adobe-experience-manager.html
When you follow this article - written by one of our AEM Touch UI experts:
What is happening?
Views
Replies
Total Likes
Since the RTE uses a hidden input field you cannot use that as a selector. If you use the RichText div and the form it still doesn't work. Here is an example of the validator:
It never reaches the alert or the "Testing" code.
-Dean
~/* ==========================================================================================
* jQuery-based validators (Touch-optimized UI)
* ==========================================================================================
*/
(function(document, $, Granite) {
"use strict";
var summaryField = "form div.coral-RichText-editable.coral-Form-field.coral-Textfield.coral-Textfield--multiline.coral-RichText.is-edited.webkit.chrome";
$.validator.register({
selector: (summaryField),
validate: function() {
alert('Testing');
if (1 == 1) {
return "Testing";
}
}
});
})(document, Granite.$, Granite);
Views
Replies
Total Likes
Not sure if the below helps , but documentation link as below :
Views
Replies
Total Likes