[Feature Request] VForm add possibility to set validation errors programatically
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 41k
- Forks
- 7.1k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 11
Description
Problem to solve
https://vuetifyjs.com/en/api/v-form/
Currenlty is possible to access to the v-form in order to access to some functions or data, like errors, isDisabled(), validate() etc, but is not possible to set the errors "manually".
Use case:
- Collect the values of the v-form, send it to the BE & BE returns some errors by field.
- This errors could be injected to the fields with v-form
This is how vee-validate does ( at least on v3 ): https://vee-validate.logaretm.com/v3/advanced/server-side-validation.html
Proposed solution
Add an new fn like "setErrors", which sets the errors on the fields by id (field name, same id's which is currently used by implemented Ref "errors").
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the VForm API documentation linked in the issue and inspect the existing errors ref and validate() behavior. Define how field IDs map to server-returned errors and what clearing or revalidation should do; done means the proposed setErrors-style API is documented and covered by relevant VForm tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100