jquery-form/form

Access form from error callback

Open

#568 opened on Jan 16, 2020

View on GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (2,199 forks)batch import
featurehelp wanted

Repository metrics

Stars
 (5,209 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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?

Contributor guide