release: WRNexusJS 0.3.5
This commit is contained in:
@@ -150,6 +150,10 @@ export const VALIDATE_RUNTIME = String.raw`
|
||||
var name = form.getAttribute("data-schema");
|
||||
var schema = (window.__wireSchemas || {})[name];
|
||||
if (!schema) return;
|
||||
// Schema-backed forms use WRNexus messages instead of the browser's
|
||||
// non-themeable native validation bubbles.
|
||||
form.noValidate = true;
|
||||
form.setAttribute("novalidate", "");
|
||||
form.addEventListener("submit", function (e) {
|
||||
e.preventDefault();
|
||||
if (validateForm(form, schema) > 0) return; // client-invalid: stay put, errors shown
|
||||
|
||||
Reference in New Issue
Block a user