@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.mjs CHANGED
@@ -1267,7 +1267,12 @@ class Bindings {
1267
1267
  });
1268
1268
  fieldErrors.forEach(e => {
1269
1269
  const name = e.context.replace("[", ".").replace("].", ".").replace("]", "");
1270
- form.querySelectorAll(`[name='${CSS.escape(name)}']`).forEach(input => input.setCustomValidity?.(e.reason));
1270
+ const parts = name.split(".");
1271
+ for (let i = parts.length; i != 0; --i) {
1272
+ const prefix = parts.slice(0, i).join(".");
1273
+ const suffix = parts.slice(i, parts.length).join(".");
1274
+ form.querySelectorAll(`[name='${CSS.escape(prefix)}']`).forEach(input => input.setCustomValidity?.(e.reason, suffix));
1275
+ }
1271
1276
  });
1272
1277
  form.querySelectorAll("ful-errors").forEach(el => {
1273
1278
  const hel = /** @type HTMLElement} */ (el);