Skip to content

meta.dirty never becomes true when a field is initialized with undefined #5034

Open
@Nodios

Description

@Nodios

What happened?

This is "copy" of #5033 because it still does not work. I see the OP closed it with duplicated issues however it still does not work. Please see reproduction code: https://stackblitz.com/edit/vitejs-vite-huj1m5qm?file=src%2FApp.vue

Observe that in the initial values, value of "test" is set to undefined. In that case, dirty is not changed as expected. If you change the initial value from undefined to an empty string, it works as expected.

Reproduction steps

  1. Open the Stackblitz link
  2. Type anything in input "Person name"
  3. Observe form dirty remains "false"

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

Demo link

https://stackblitz.com/edit/vitejs-vite-huj1m5qm?file=src%2FApp.vue

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions