Browse Source

fix: form view field validation error message, use alias name instead of original field name

Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: frankmagoba <franklinmagoba4@gmail.com>
Co-authored-by: gitstart_bot <gitstart_bot@users.noreply.github.com>
Co-authored-by: Mayomi Ayandiran <ayandiranmayomi@gmail.com>
pull/4933/head
gitstart 2 years ago
parent
commit
8ceb91051f
  1. 14
      packages/nc-gui/components/smartsheet/Form.vue

14
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`,
},
]"
>
<LazySmartsheetVirtualCell
v-model="formState[element.title]"
@ -679,7 +684,12 @@ watch(view, (nextView) => {
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`,
},
]"
>
<LazySmartsheetCell
v-model="formState[element.title]"

Loading…
Cancel
Save