@optionfactory/ful 1.0.14 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ful.iife.js CHANGED
@@ -1268,7 +1268,12 @@ var ful = (function (exports, ftl) {
1268
1268
  });
1269
1269
  fieldErrors.forEach(e => {
1270
1270
  const name = e.context.replace("[", ".").replace("].", ".").replace("]", "");
1271
- form.querySelectorAll(`[name='${CSS.escape(name)}']`).forEach(input => input.setCustomValidity?.(e.reason));
1271
+ const parts = name.split(".");
1272
+ for (let i = parts.length; i != 0; --i) {
1273
+ const prefix = parts.slice(0, i).join(".");
1274
+ const suffix = parts.slice(i, parts.length).join(".");
1275
+ form.querySelectorAll(`[name='${CSS.escape(prefix)}']`).forEach(input => input.setCustomValidity?.(e.reason, suffix));
1276
+ }
1272
1277
  });
1273
1278
  form.querySelectorAll("ful-errors").forEach(el => {
1274
1279
  const hel = /** @type HTMLElement} */ (el);