Merge pull request #28 from flashbackzoo/pulls/fix-live-validation

Fix live validation
This commit is contained in:
Damian Mooyman 2015-08-14 10:36:43 +12:00
commit 50a26d00be

View File

@ -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
});
}