Skip to content

Commit c899f69

Browse files
gustavocidornelaswhoseoyster
authored andcommitted
Completes OPEN-3582 Validate that there are no columns starting with 'openlayer'
1 parent 54511ba commit c899f69

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

openlayer/schemas.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88

99
# ---------------------------- Regular expressions --------------------------- #
1010
COLUMN_NAME_REGEX = validate = ma.validate.Regexp(
11-
r"^[a-zA-Z0-9_-]+$",
11+
r"^(?!openlayer)[a-zA-Z0-9_-]+$",
1212
error="strings that are not alphanumeric with underscores or hyphens."
13-
+ " Spaces and special characters are not allowed.",
13+
+ " Spaces and special characters are not allowed."
14+
+ " The string cannot start with `openlayer`.",
1415
)
1516
LANGUAGE_CODE_REGEX = ma.validate.Regexp(
1617
r"^[a-z]{2}(-[A-Z]{2})?$",

0 commit comments

Comments
 (0)