From 7c96de6990d4f09b4745258840bf8c6dfecdcc02 Mon Sep 17 00:00:00 2001 From: drieshuybens Date: Thu, 23 May 2024 16:46:26 +0200 Subject: [PATCH] extra validatie --- frontend/src/i18n/locales/en.ts | 3 +++ frontend/src/i18n/locales/nl.ts | 3 +++ frontend/src/views/CreateProjectView.vue | 23 +++++++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index 8212be92..0841d67e 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -97,6 +97,9 @@ export default { testfiles: "Testfiles", requirements_disclaimer: "For info on the usage of requirements please visit our", to_project: "To Project", + titlereq: "Project title is required.", + date_check: "Deadline or publish date cannot be in the past. Please correct the dates.", + publish_check: "Publish date must be before or on the deadline. Please correct the dates.", }, navigation: { home: "Home", diff --git a/frontend/src/i18n/locales/nl.ts b/frontend/src/i18n/locales/nl.ts index 652d7180..af7bb4ac 100644 --- a/frontend/src/i18n/locales/nl.ts +++ b/frontend/src/i18n/locales/nl.ts @@ -99,6 +99,9 @@ export default { testfiles: "Testbestanden", requirements_disclaimer: "Voor info over het gebruik van bestandsvereisten, bezoek onze ", to_project: "Naar project", + titlereq: "Project titel is verplicht.", + date_check: "Deadline of publiceerdatum kan niet in het verleden liggen.", + publish_check: "Publiceerdatum moet voor de deadline liggen.", }, navigation: { home: "Hoofdscherm", diff --git a/frontend/src/views/CreateProjectView.vue b/frontend/src/views/CreateProjectView.vue index 5ed5f619..2f09c4c7 100644 --- a/frontend/src/views/CreateProjectView.vue +++ b/frontend/src/views/CreateProjectView.vue @@ -15,6 +15,7 @@ :label="$t('project.assignment')" required :placeholder="$t('submit.create_title_tip')" + :rules="titleRules" /> [(v) => !!v.trim() || t("project.titlereq")]);