logaretm / vee-validate

✅ Painless Vue forms
https://vee-validate.logaretm.com/v4
MIT License
10.79k stars 1.26k forks source link

defineField path incorrectly resolves in error output when it's a getter #4877

Closed jack-allocate closed 3 days ago

jack-allocate commented 3 weeks ago

What happened?

defineField supports a MaybeRefOrGetter, which implies I could do: defineField(() => 'email')

However, the resulting errors doesn't seem to access the inner value of the path

errors: {
  "() => 'email'": "this is a required field"
}

Reproduction steps

Check demo link

Version

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

What browsers are you seeing the problem on?

Relevant log output

No response

Demo link

https://stackblitz.com/edit/7qet3p-52nwk7?file=src%2FApp.vue

Code of Conduct

logaretm commented 3 days ago

Thanks for reporting this, the fix will be shipped in the next release.