jquery-form/form

Access form from error callback

thewebartisan7 opened this issue · 1 comments

Description:

Seem that error callback has not $form object to access it.

For example other callback have it, like:

        beforeSerialize: function($form, options) {
            // do something with $form
        },
       success: function(responseText, statusText, xhr, $form) {
            // do something with $form
       }

But error has only:

               error: function (xhr, status, error) {
                   // No $form object
                },

Expected Behavior:

               error: function (xhr, status, error, $form) {
                   // has $form now
                },

Or am I missing something?

The error callback has been deprecated due to incompatibility with jQuery 3 Slim. (issue #544)
https://jquery-form.github.io/form/options/#error
PRs increasing compatibility with newer versions of jQuery are much appreciated.