Validation.Engine issue

I am using validation.Engine from Github.

Have used this for a while now and performs every time.
Having a problem with my current project that uses .submit ajax.

The form (if validation fails) still calls the .submit handler.

$("#Customer").validationEngine('attach');                      
    $('#Customer').submit(function(e){
          e.preventDefault();
           $('#cboxOverlay').hide();    
           $('#colorbox').hide();
          var $regform = $("#Customer");
          var sData = $regform.serialize();      
        $.ajax({
            type: 'POST',
            dataType: 'text',                
            url: 'ajax/set-booking.php',
            data: sData,
            success: function () {
            }
        });               
    });

You may find this validation ajax demo to be useful.

Yeah, it’s not required to call ajax on each field validation, this is not an issue.
Only to attach itself to the main form submit handler.

Excellent, so the options for ajaxFormValidation and onAjaxFormComplete should do you well.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.