Quick fix to allow case sensitive versions of the prohibited columns, this is allowed on the backend and many apps like this exist, there isn't really any reason to disallow this anymore.

This commit is contained in:
mike12345567 2024-06-28 13:19:35 +01:00
parent 26b4288c67
commit 7a4336a4a0
1 changed files with 1 additions and 5 deletions

View File

@ -495,11 +495,7 @@
newError.name = `Column name cannot start with an underscore.`
} else if (fieldInfo.name && !fieldInfo.name.match(ValidColumnNameRegex)) {
newError.name = `Illegal character; must be alpha-numeric.`
} else if (
prohibited.some(
name => fieldInfo?.name?.toLowerCase() === name.toLowerCase()
)
) {
} else if (prohibited.some(name => fieldInfo?.name === name)) {
newError.name = `${prohibited.join(
", "
)} are not allowed as column names - case insensitive.`