Browse Source

Merge pull request #4933 from gitstart/NCDBOSS-19

fix: form view field validation error message, use alias name instead of original field name
pull/4984/head
աɨռɢӄաօռɢ 2 years ago committed by GitHub
parent
commit
e05fa359bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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)" v-if="isVirtualCol(element)"
:name="element.title" :name="element.title"
class="!mb-0" class="!mb-0"
:rules="[{ required: isRequired(element, element.required), message: `${element.title} is required` }]" :rules="[
{
required: isRequired(element, element.required),
message: `${element.label || element.title} is required`,
},
]"
> >
<LazySmartsheetVirtualCell <LazySmartsheetVirtualCell
v-model="formState[element.title]" v-model="formState[element.title]"
@ -679,7 +684,12 @@ watch(view, (nextView) => {
v-else v-else
:name="element.title" :name="element.title"
class="!mb-0" class="!mb-0"
:rules="[{ required: isRequired(element, element.required), message: `${element.title} is required` }]" :rules="[
{
required: isRequired(element, element.required),
message: `${element.label || element.title} is required`,
},
]"
> >
<LazySmartsheetCell <LazySmartsheetCell
v-model="formState[element.title]" v-model="formState[element.title]"

Loading…
Cancel
Save