Skip to content

Commit

Permalink
Allow digit as first character in a CO tag
Browse files Browse the repository at this point in the history
  • Loading branch information
baszoetekouw committed Nov 21, 2022
1 parent 3e64069 commit ce92100
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/validations/regExps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion server/db/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ce92100

Please sign in to comment.