diff --git a/packages/nc-gui-v2/components/template/Editor.vue b/packages/nc-gui-v2/components/template/Editor.vue index 394ef72563..d9a1dfeec4 100644 --- a/packages/nc-gui-v2/components/template/Editor.vue +++ b/packages/nc-gui-v2/components/template/Editor.vue @@ -86,12 +86,14 @@ const data = reactive({ const validators = computed(() => { // TODO: centralise + const tnValidator = [{ required: true, message: 'Please fill in table name', trigger: 'change' }] const cnValidator = [{ required: true, message: 'Please fill in column name', trigger: 'change' }] const uidtValidator = [{ required: true, message: 'Please fill in column type', trigger: 'change' }] // TODO: check existing validation logic const dtxpValidator = [{}] let res: any = {} for (let i = 0; i < data.tables.length; i++) { + res[`tables.${i}.table_name`] = tnValidator for (let j = 0; j < data.tables[i].columns.length; j++) { res[`tables.${i}.columns.${j}.column_name`] = cnValidator res[`tables.${i}.columns.${j}.uidt`] = uidtValidator @@ -317,15 +319,17 @@ const importTemplate = async () => {