From 8ceb91051f24e86b77b531eb168b0c427ab018dd Mon Sep 17 00:00:00 2001 From: gitstart Date: Tue, 31 Jan 2023 07:31:45 +0000 Subject: [PATCH 1/2] fix: form view field validation error message, use alias name instead of original field name Co-authored-by: gitstart Co-authored-by: gitstart Co-authored-by: frankmagoba Co-authored-by: gitstart_bot Co-authored-by: Mayomi Ayandiran --- packages/nc-gui/components/smartsheet/Form.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/Form.vue b/packages/nc-gui/components/smartsheet/Form.vue index b6bf4f3ff5..227ab443a4 100644 --- a/packages/nc-gui/components/smartsheet/Form.vue +++ b/packages/nc-gui/components/smartsheet/Form.vue @@ -662,7 +662,12 @@ watch(view, (nextView) => { v-if="isVirtualCol(element)" :name="element.title" class="!mb-0" - :rules="[{ required: isRequired(element, element.required), message: `${element.title} is required` }]" + :rules="[ + { + required: isRequired(element, element.required), + message: `${element.label ? element.label : element.title} is required`, + }, + ]" > { v-else :name="element.title" class="!mb-0" - :rules="[{ required: isRequired(element, element.required), message: `${element.label} is required` }]" + :rules="[ + { + required: isRequired(element, element.required), + message: `${element.label ? element.label : element.title} is required`, + }, + ]" > Date: Tue, 31 Jan 2023 09:03:10 +0000 Subject: [PATCH 2/2] fix: form view field validation error message, use alias name instead of original field name Co-authored-by: frankmagoba Co-authored-by: gitstart Co-authored-by: gitstart Co-authored-by: gitstart_bot Co-authored-by: Mayomi Ayandiran --- packages/nc-gui/components/smartsheet/Form.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/Form.vue b/packages/nc-gui/components/smartsheet/Form.vue index 227ab443a4..8b159cf669 100644 --- a/packages/nc-gui/components/smartsheet/Form.vue +++ b/packages/nc-gui/components/smartsheet/Form.vue @@ -665,7 +665,7 @@ watch(view, (nextView) => { :rules="[ { required: isRequired(element, element.required), - message: `${element.label ? element.label : element.title} is required`, + message: `${element.label || element.title} is required`, }, ]" > @@ -687,7 +687,7 @@ watch(view, (nextView) => { :rules="[ { required: isRequired(element, element.required), - message: `${element.label ? element.label : element.title} is required`, + message: `${element.label || element.title} is required`, }, ]" >