release: WRNexusJS 0.5.10

This commit is contained in:
2026-07-30 13:36:29 +05:30
parent 8fc6f15402
commit d1b0c55b53
159 changed files with 7509 additions and 604 deletions
+9
View File
@@ -194,6 +194,14 @@ export const VALIDATE_RUNTIME = String.raw`
.then(function () { btns.forEach(function (b) { b.disabled = false; }); });
}
function runSubmitGuards(form, event) {
var guards = form.__wireSubmitGuards || [];
for (var index = 0; index < guards.length; index += 1) {
if (guards[index](event) === false) return false;
}
return true;
}
function bind(form) {
if (form.__wireValidateBound) return;
var name = form.getAttribute("data-schema");
@@ -219,6 +227,7 @@ export const VALIDATE_RUNTIME = String.raw`
clearErrors(form, schema);
hideSuccess(form);
if (validateForm(form, schema) > 0) return; // client-invalid: stay put, errors shown
if (!runSubmitGuards(form, e)) return;
submitForm(form, schema);
});
function validateTarget(e) {