Skip to content

Commit

Permalink
refactor(form): bind validation to form's button rather than the form
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran committed Apr 23, 2024
1 parent bd8141c commit cead111
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benefits/core/templates/core/includes/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
}
}

$("#{{ form.id }}").on("click", function(e) {
$("button[type=submit]", "#{{ form.id }}").on("click", function(e) {
// revalidate all fields
$("[data-custom-validity]").each(function() {
let input_element = $(this)[0];
Expand Down

0 comments on commit cead111

Please sign in to comment.