1
0
Fork 0
mirror of synced 2024-09-29 08:41:16 +13:00

Merge pull request #6042 from Budibase/bug/sev3/bad-special-document-member

Internal table columns cannot start with _
This commit is contained in:
Martin McKeaveney 2022-05-26 23:08:31 +01:00 committed by GitHub
commit e98cdef74d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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`