Skip to content

When using async field-level validation with validateFields set to [], making changes to multiple fields causes some errors to be suppressed. #492

Description

@mynamesleon

Are you submitting a bug report or a feature request?

Bug report

What is the current behavior?

  1. Set-up 2 fields fields, each with an async validate function (with a deliberate delay), and with validateFields set to an empty array (so that they only validate themselves)
  2. Add a character into one field to trigger the validation
  3. tab to the other field (while the first field's validation is still ongoing) and add a character into that one too
  4. Once the validation has finished for each independent field, only the second one will have an error in its FieldState.

What is the expected behavior?

The error property on the FieldState is correctly populated.

Sandbox Link

https://codesandbox.io/p/sandbox/final-form-async-field-issue-hd93sm

What's your environment?

Latest versions

Other information

I have included instructions in the codesandbox link as well.
(I've set this up using react-final-form for ease)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions