Skip to content

ValidationObserver scoped slot doesn't update dirty/pristine flag #2209

@dmoebius

Description

@dmoebius

Versions

  • vee-validate: 2.2.14
  • vue: 2.6.10

Describe the bug
Using ValidationObserver with a scoped slot to retrieve the current values of the flags dirty and pristine:

  <validation-observer tag="form" v-slot="{ dirty, pristine, valid, invalid, errors }">

    <validation-provider name="Text" :rules="'required|min:2'"  vid="text">
      <label>Text
        <input v-model="text" type="text"/>
      </label>
    </validation-provider>

The flags dirty and pristine are not updated, whereas valid and invalid are.

See demo: https://codepen.io/dmoebius/pen/XvwLBb?editors=1010

Additional context
With vee-validate 2.2.3 is seems to work. You can verify this if you change the version in the Codepen demo. So the bug must have been introduced between 2.2.3 and 2.2.14.

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