Tagfield not working with foundation-validation
Hello,
We're using a tagfield (cq/gui/components/coral/common/form/tagfield) in a dialog and need to make the field required, but only if it's visible. To do this we've written custom validation using foundation-validation but it doesn't appear to be triggered for the tagfield type. Is this because it is not a granite field? Is there a better way to perform validation for this field? I have confirmed the same validation function works for other granite fields.

(function ($, $document) {
"use strict";
$(window).adaptTo('foundation-registry').register("foundation.validation.validator", {
selector: "[data-validation='required-if-visible']",
validate: function(el) {
.... this is never executed ....
}});
})($, $(document));