From d73484fb69867dc339527982ffcc598bd9bd7835 Mon Sep 17 00:00:00 2001 From: David Craig Date: Fri, 14 Aug 2015 09:57:06 +1200 Subject: [PATCH] Fix live validation --- javascript/UserForm.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/javascript/UserForm.js b/javascript/UserForm.js index 3ed68c1..112f092 100644 --- a/javascript/UserForm.js +++ b/javascript/UserForm.js @@ -71,7 +71,7 @@ jQuery(function ($) { */ UserForm.prototype.validationOptions = { ignore: ':hidden', - errorClass: 'required', + errorClass: 'error', errorElement: 'span', errorPlacement: function (error, element) { error.addClass('message'); @@ -500,11 +500,9 @@ jQuery(function ($) { // Extend the default validation options with conditional options // that are set by the user in the CMS. - if (CONSTANTS.ENABLE_LIVE_VALIDATION) { + if (CONSTANTS.ENABLE_LIVE_VALIDATION === false) { $.extend(UserForm.prototype.validationOptions, { - onfocusout: function (element) { - this.element(element); - } + onfocusout: false }); }