From ab4e6ece2c42cabde42059fc1edb3195d097bb1f Mon Sep 17 00:00:00 2001 From: "Petter H. Juliussen" Date: Wed, 6 Sep 2023 13:31:15 +0200 Subject: [PATCH] Make form validation less eager --- CHANGELOG.md | 2 + src/components/drawers/EditItemDrawer.vue | 6 +-- src/components/drawers/EditKeyResult.vue | 6 +-- src/components/drawers/EditObjective.vue | 6 +-- src/components/forms/KpiAdminForm.vue | 2 +- src/components/generic/form/FormSection.vue | 4 +- src/config/validation.js | 42 +++++++++++++++++++++ src/main.js | 33 +++------------- 8 files changed, 61 insertions(+), 40 deletions(-) create mode 100644 src/config/validation.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 1330eeb0c..ee6ba59a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ All notable changes to this project will be documented in this file. The format - Made links clickable in the description of objects, key results and goals. - It is no longer possible to close open modals or drawers by clicking outside them. This is meant to prevent accidental data loss in unsaved forms. +- Validation in forms are now less "eager" and errors are only displayed after + attempted form submissions. ## [3.9.0] 2023-09-01 diff --git a/src/components/drawers/EditItemDrawer.vue b/src/components/drawers/EditItemDrawer.vue index f20ea0f8f..9e8c45b1d 100644 --- a/src/components/drawers/EditItemDrawer.vue +++ b/src/components/drawers/EditItemDrawer.vue @@ -16,7 +16,7 @@