vuetifyjs / vuetifyjs/vuetify

[Feature Request] VForm add possibility to set validation errors programatically

Open
#19,099 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C: VForm T: feature
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:

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.