Most of the docs I found is not helping me as it seems to be outdated or I am doing something wrong.
$.fn.parsley.defaults = {} // not working
window.parsley.defaults = {} // not working
window.ParsleyConfig = {} // not working
Basically what I am trying to do is, I want the below given options to set globally and not repeat the same code for each form in my application:
$('#sign-in-form').parsley({
successClass: "has-success",
errorClass: "has-error",
classHandler: function (el) {
return el.$element.closest(".form-group");
},
errorsWrapper: "<span class='help-block'></span>",
errorTemplate: "<span></span>"
});
The above code is working (along with bootstrap)