From 2611824eff2bcc55d182b44fb6e392517bfdc33a Mon Sep 17 00:00:00 2001 From: andmironov Date: Thu, 15 Dec 2016 15:21:14 +0300 Subject: [PATCH] improved form --- src/js/mc-validate.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/js/mc-validate.js b/src/js/mc-validate.js index b3b0a5f..7d1b7b6 100644 --- a/src/js/mc-validate.js +++ b/src/js/mc-validate.js @@ -323,15 +323,12 @@ groups: mc.getGroups(), highlight: function(element, errorClass, validClass) { - shakeForm() - showErrorMessage() + }, // Place a field's inline error HTML errorPlacement: function(error, element) { - $('.email-form__error-message').html(error); enableInputs(); - showErrorMessage(); }, invalidHandler: function() { @@ -342,6 +339,7 @@ showErrors: function(errorMap, errorList) { var content = errorMap.EMAIL; showErrorMessage(content); + shakeForm() }, // Submit the form via ajax (see: jQuery Form plugin)