1
0
Fork 0
mirror of synced 2024-07-15 03:05:57 +12:00

Block lucene special characters from new column

This commit is contained in:
Mel O'Hagan 2022-11-08 17:02:31 +00:00
parent 963fc738f4
commit 572e31fb29

View file

@ -304,6 +304,8 @@
const newError = {}
if (!external && fieldInfo.name?.startsWith("_")) {
newError.name = `Column name cannot start with an underscore.`
} else if (fieldInfo.name?.match(/[\-!*+?^"{}()~\/[\]\\]/g)) {
newError.name = `Illegal character; cannot be: + - ! ( ) { } [ ] ^ " ~ * ? : \\ /`
} else if (PROHIBITED_COLUMN_NAMES.some(name => fieldInfo.name === name)) {
newError.name = `${PROHIBITED_COLUMN_NAMES.join(
", "