Skip to content

useField with object values not validating. #5088

@JarvisH

Description

@JarvisH

What happened?

When using useField with an object value + useForm where rendering of the useField component instance is delayed, the validation fails when using resetForm.

Reproduction steps

  1. Create parent component where useForm is used and rendering of form is delayed.
  2. Add logic to reset form and then render the child component containing useField()
  3. Form schema and child component should contain an object value, where one or more properties are required.
  4. Trigger logic defined in step 2.
  5. Form receieves the correct values, but does not validate correctly.
    ...

I noticed this did work at least in version 4.11 and appears to have broken in version 4.12.0

Version

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

What browsers are you seeing the problem on?

Only chrome was tested.

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Demo link

https://stackblitz.com/edit/neyvd4-yrhrhkhq?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