I am facing one issue in AEm 6.4 touch ui with event listener.
When I open the page properties dialog and after configuring the field values I have to validate them if any field value is invalid I have to dispaly error message and not allow them to submit dialog before validating.
I've to trigger these error messages on clicking Save&Close buttons.
With the below code able to trigger the events but it is always submitting the dialog
(function(document, $, ns) {
"use strict";
$(document).on('foundation-form-submitted', '.granite-form-saveactivator-form', function(ev, success) {
});
})(document, Granite.$, Granite.author);