Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Unbind method for validationEngine #287

christian-kolb opened this Issue · 6 comments

3 participants


I use the validationEngine to validate a from element in a web application. The data of the form is send via AJAX and the form is never submitted. The form is also used several times and has be be resetted.

When I reset the required fields I get error messages from the validationEngine because they aren't filled any more. That's a perfectly right behaviour, but very annoying when resetting a form on purpose.

I would like to unbind the validationEngine from the form, then reset it and add the validationEngine again, but I didn't find any kind of unbind method in the validationEngine.

Could you add such an unbind method?



did you try the detach() method ?



do you mean with the following?


Yes I tried it, but it didn't had any effekt at all.


Looking at the code, detach should do the trick. it unregisters the events.

Could you please copy paste, the exact code that you are using.


When I show the form I call


On save I call


Then I reset the form with the following code:


function resetForm(form) {

// Reset all form fields
function resetFormFields(form) {
    $(':input', $(form)).each(function(i, item) {
        switch(item.tagName.toLowerCase()) {
            case 'input':
                switch(item.type.toLowerCase()) {
                    case 'hidden':
                    case 'text':
                        item.value = '';
                    case 'radio':
                    case 'checkbox':
                        item.checked = '';
            case 'select':
                item.selectedIndex = 0;
            case 'textarea':
                item.value = '';

And in the moment I reset the form, I get the error messages on top of each reseted field.


I maybe found something.

Right before I reset the form, I check if the form ist valid with the following call:


When I delete this line, the detach works perfect and I can reset the form without any error messages.

But I need to validate the form before sending the data to the server. Have I done anything wrong there or is this a bug?


Hi christian,

the engine wqill automatically validate the form when submitting it, 'validate' is used if you want to directly validate the form without submitting it, as for detach, I just tested it, and it seems something is wrong in your code,

In any case withotu a live example it is hard to debug

@posabsolute posabsolute closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.