mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-01 06:51:32 +00:00
Merge pull request #400 from BoPeng/submit
Perform form validation even if the form is submitted by an element within it
This commit is contained in:
commit
24b854723b
@ -1665,7 +1665,7 @@ return (function () {
|
||||
var errors = [];
|
||||
|
||||
// only validate when form is directly submitted and novalidate is not set
|
||||
var validate = matches(elt, 'form') && elt.noValidate !== true;
|
||||
var validate = (matches(elt, 'form') || closest(elt, 'form')) && elt.noValidate !== true;
|
||||
|
||||
// for a non-GET include the closest form
|
||||
if (verb !== 'get') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user