Approach for custom form validation
Problem
We had a recent use case to introduce custom validation for Customer registration form (/customers/sign_up) and Edit customer details form (/customers/edit) to check for the presence of emojis.
We added a validation directive which supports custom validation for forms similar to how we handle custom validation in GitLab.com
However, we have a few libraries available which solves the form validation problem already which we could leverage so we don't have to maintain it in the future. This issue is to discuss the possibility of adopting an existing library to do custom form validation instead of re-inventing the wheel.
Proposal
There are a couple of libraries recommended by BootstrapVue which we could look into so we can use the one that best fits our needs:
VeeValidate-
Vuelidate(Natalia Tepluhina is one of the main contributors)
npm package comparison: https://npmtrends.com/vee-validate-vs-vuelidate
Original discussion: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/5006#note_1026232047