bcgov / bcgov/entity

RFC: determine best practices for field and form validation

Open
#11,931 2 comments 0 reactions 0 assignees View on GitHub
ENTITY - DO NOT USE
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

There are a lot of outstanding questions regarding:
- what validations to apply to different fields
- what validations to appy to a form as a whole
- when to trigger validations and show errors

A lot of these questions were asked in [`#11837`](https://app.zenhub.com/workspaces/entities-team-space-6143567664fb320019b81f39/issues/bcgov/entity/11837) and others are being mulled over by @severinbeauvais , @yuisotozaki , @tlebedovich, @rkim13103 , @forgeuxGH5 et al.

This ticket is to answer and document the answers so as to provide best practises for design and implementation from this point forward. (See also [`#11922`](https://app.zenhub.com/workspaces/design-team-space-6144b1bb15dbac0013e68828/issues/bcgov/entity/11922) for design considerations.)

#### Validation mechanisms

- [vuetify-mask](https://www.npmjs.com/package/vuetify-mask)
- [v-mask](https://www.npmjs.com/package/v-mask)
- [forms](https://vuetifyjs.com/en/components/forms/)
- [input components](https://vuetifyjs.com/en/api/v-input/#props)
- [vuelidate/schema](https://github.com/vuelidate/vuelidate)
- business logic (eg, need at least X directors) (higher level than component itself but part of overall filing requirements)
- _add others here_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the questions in #11837 and the design considerations in #11922, then compare the listed mechanisms: vuetify-mask, v-mask, forms, input components, Vuelidate/schema, and business logic. Done means the outstanding field, form-level, and validation-timing questions are answered and the resulting best practices are documented for future design and implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation, frontend
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.