Browse Source

fix(gui-v2): virtual cell validation correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3188/head
Pranav C 2 years ago
parent
commit
f794f3194d
  1. 14
      packages/nc-gui-v2/components/shared-view/Form.vue

14
packages/nc-gui-v2/components/shared-view/Form.vue

@ -86,15 +86,11 @@ function isRequired(_columnObj: Record<string, any>, required = false) {
</div>
<div v-if="isVirtualCol(field)" class="mt-0">
<SmartsheetVirtualCell class="mt-0 nc-input" :column="field" />
<div
v-if="
v$.virtual?.$dirty &&
(!v$.virtual?.[field.title]?.required || !v$.virtual?.[field.title]?.minLength)
"
class="text-xs text-red-500"
>
Field is required.
</div>
<template v-if="v$.virtual.$dirty && v$.virtual?.[field.title]">
<div v-for="error of v$.virtual[field.title].$errors" :key="error" class="text-xs text-red-500">
{{ error.$message }}
</div>
</template>
</div>
<div v-else class="mt-0">
<SmartsheetCell

Loading…
Cancel
Save