jquery-form / jquery-form/form

Access form from error callback

Open
#568 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature help wanted
Dominant language
JavaScript
Stars
5.1k
Forks
2.1k
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the plugin's error callback entry point and compare its arguments with the beforeSerialize and success callbacks shown in the issue. Trace how the form object is available to those callbacks, then verify that error handlers receive it as a fourth argument without breaking the existing xhr, status, and error values.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.