From b4427fa46ce1b6674a627d261cebc9c203f8cd32 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 24 May 2022 10:22:20 +0100 Subject: [PATCH] Internal table columns cannot start with _ --- .../backend/DataTable/modals/CreateEditColumn.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index aa3915de58..62a367ea7d 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -304,7 +304,9 @@ ) } const newError = {} - if (PROHIBITED_COLUMN_NAMES.some(name => fieldInfo.name === name)) { + if (!external && fieldInfo.name?.startsWith("_")) { + newError.name = `Column name cannot start with an underscore.` + } else if (PROHIBITED_COLUMN_NAMES.some(name => fieldInfo.name === name)) { newError.name = `${PROHIBITED_COLUMN_NAMES.join( ", " )} are not allowed as column names`