From 2a47371845320f7fe1c2e6231a175f829eb24ae9 Mon Sep 17 00:00:00 2001 From: Zakrava Date: Wed, 3 Jan 2018 02:08:26 +0100 Subject: [PATCH] fix inserting message when parent is false --- live-form-validation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-form-validation.js b/live-form-validation.js index 691036b..1cc3606 100644 --- a/live-form-validation.js +++ b/live-form-validation.js @@ -303,7 +303,7 @@ LiveForm.getMessageElement = function(el) { var parentEl = this.getMessageParent(el); if (parentEl) { - parentEl.appendChild(messageEl); + parentEl.insertBefore(messageEl, el.nextSibling); } }