diff --git a/client/src/validations/regExps.js b/client/src/validations/regExps.js index 6ff068693..437c881ec 100644 --- a/client/src/validations/regExps.js +++ b/client/src/validations/regExps.js @@ -27,7 +27,7 @@ export const validateSSHKey = sshKey => { const shortNameRegexp = /^[^a-z]*|[^a-z_0-9]+/gi -const tagNameRegexp = /^[^a-z]*|[^a-z_0-9-]+/gi +const tagNameRegexp = /^[^a-z0-9]*|[^a-z_0-9-]+/gi export const sanitizeShortName = shortName => { return shortName ? shortName.replace(shortNameRegexp, "").substring(0, 16).toLowerCase() : shortName; diff --git a/server/db/defaults.py b/server/db/defaults.py index d2a66c796..69a403154 100644 --- a/server/db/defaults.py +++ b/server/db/defaults.py @@ -65,7 +65,7 @@ def valid_uri_attributes(data, uri_attributes): return True -tag_re = re.compile(r"^[a-z][a-z_0-9-]+$") +tag_re = re.compile(r"^[a-z0-9][a-z_0-9-]+$") def valid_tag_label(tag_value: Optional[str]) -> bool: