Skip to content

[v4] Errors continue to exist when deleting an item #3664

Description

@alex-korniienko

What happened?

When you remove an item from the field array, errors still exist in the errors object, they should be reindexed according to the current field's value. It`s a big problem because when you will remove and push again errors will be displayed on the new item.
image

When I will press Add button my new item with index 1 will have an error.

Reproduction steps

  1. Create an FieldArray and add basic actions push, remove
  2. Add displaying errors from the form
  3. Start removing items from fields and check errors displaying

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Relevant log output

No response

Demo link

https://codesandbox.io/s/vee-validate-v4-repeater-d9qft?file=/src/App.vue

Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugUnintended behavior

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions