From 4eb5294526b42d01c6cbf6bfae6f76cf02453d4c Mon Sep 17 00:00:00 2001 From: viniciusban Date: Sun, 13 Dec 2015 04:57:19 -0200 Subject: [PATCH] Submit the form if validation passes. But avoid submission if there are errors. Closes #7357 - Form validation with data-abide Closes #7127 - Form + abide validation does not submit --- js/foundation.abide.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/foundation.abide.js b/js/foundation.abide.js index 18fe2ad28..80977e172 100644 --- a/js/foundation.abide.js +++ b/js/foundation.abide.js @@ -293,9 +293,11 @@ // what are all the things that can go wrong with a form? if ($form.find('.form-error.is-visible').length || $form.find('.is-invalid-label').length) { $form.find('[data-abide-error]').css('display', 'block'); + return false; // don't submit when there are errors } else { $form.find('[data-abide-error]').css('display', 'none'); + return true; // ok to submit } }; /** -- 2.47.2