So I finally gave up on trying to find a workaround that doesn’t imply modifying core files.
I added a “fix” so that the dmxValidator.js would parse the expression:
s.textContent = t.startsWith("'") ? dmx.parse(t) : t
dmx.validate.setBootstrap4Message = function (e, t) {
if (!e.hasAttribute("data-msg-custom") && (e.getAttribute("name") || e.getAttribute("id"))) {
var u = e.type.toLowerCase(),
a = "dmxValidatorError" + (e.form ? e.form.getAttribute("id") : "") + (e.getAttribute("name") || e.getAttribute("id")),
s = document.getElementById(a);
s || ((s = document.createElement("div")).id = a, s.className = "invalid-feedback", e.parentElement.appendChild(s)), e.hasAttribute("medium-editor-textarea-id") &&
(e = document.getElementById(e.getAttribute("medium-editor-textarea-id"))), "hidden" != u && "g-recaptcha-response" != e.name &&
(t ? (e.classList.remove("is-valid"), e.classList.add("is-invalid")) : (e.classList.remove("is-invalid"), e.classList.add("is-valid"))), s.textContent = dmx.parse(t)
}
}
Finally I made sure that the string returned as the validation message was parsable.


Resulting in:
In summary:
Can we get validations messages parsed correctly in SC so they can be formatted in AC?
Any string sent from SC is “formattable” in AC as a data binding but SC validation to AC is hardcoded so I can’t apply a formatter.
I would rather avoid having to deviate from standard by patching core files.
