logaretm / vee-validate

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

useField's rules validation state #4571

Open IMAT13 opened 10 months ago

IMAT13 commented 10 months ago

Is your feature request related to a problem? Please describe.

There are some cases in which it would be helpful to know the state of rules, I have come across some cases where I needed to know which rule is in which state ("passed", "pending", "failed" for example) but the only information I get from use field, for example, is errors object which I have to create a map between errors and rules to get the failed rules, I want to know your opinion on the matter, is it helpful or necessary to have this feature or not?

Describe the solution you'd like

Another property like the current errors object which has more information about the validation state.

Describe alternatives you've considered

I don't have an alternative at the moment

JulianVallee commented 2 days ago

Just a +1, would have been useful during a migration from Nuxt2 to Nuxt3