Does anyone know how I can remove all created errors by the ValidationEngine with one command? I added the snippet of code that the plugin seems to use to create the popups. If you need any more information, please let me know.
The following code creates the errors:
buildPrompt : function(caller,promptText,type,ajaxed) { // ERROR PROMPT CREATION AND DISPLAY WHEN AN ERROR OCCUR
if(!$.validationEngine.settings){
$.validationEngine.defaultSetting()
}
deleteItself = "." + $(caller).attr("id") + "formError"
if($(deleteItself)[0]){
$(deleteItself).stop();
$(deleteItself).remove();
}
var divFormError = document.createElement('div');
var formErrorContent = document.createElement('div');
linkTofield = $.validationEngine.linkTofield(caller)
$(divFormError).addClass("formError")
if(type == "pass") $(divFormError).addClass("greenPopup")
if(type == "load") $(divFormError).addClass("blackPopup")
if(ajaxed) $(divFormError).addClass("ajaxed")
$(divFormError).addClass(linkTofield);
$(formErrorContent).addClass("formErrorContent");
Source code: http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/
Problem: When the user has errors on his screen and clicks a link that scrolls to another part of the page, the errors remain on an absolute position.
What I am looking for: a function that removes ALL errorç messages, there could be more than one.
It has also a predefined function in validation engine.
$('#formID1').validationEngine('hideAll');
function removeError(){$(".formError").remove()};
It's so simple... why it took me forever to get it is beyond me. Removing eerything with the .formError class kills all popups.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With