Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong project name pattern exp #20891

Closed
stonezdj opened this issue Sep 2, 2024 · 0 comments · Fixed by #20892
Closed

Wrong project name pattern exp #20891

stonezdj opened this issue Sep 2, 2024 · 0 comments · Fixed by #20892
Assignees
Labels

Comments

@stonezdj
Copy link
Contributor

stonezdj commented Sep 2, 2024

When creating a new project,
the console outputs the error message:

Pattern attribute value ^[a-z0-9]+(?:[._-][a-z0-9]+)*$ is not a valid regular expression: Uncaught SyntaxError: Invalid regular expression: /^[a-z0-9]+(?:[._-][a-z0-9]+)*$/v: Invalid character in character class

The same error in

  1. creating a robot account.
  2. creating a new tag
  3. creating project
    It is the - in pattern ^[a-z0-9]+(?:[._-][a-z0-9]+)*$ should be escaped \-

see: https://stackoverflow.com/questions/76285652/why-is-my-regex-valid-with-the-regexp-u-flag-but-not-with-the-v-flag-and-does-n/76287241#76287241

@stonezdj stonezdj self-assigned this Sep 2, 2024
stonezdj added a commit to stonezdj/harbor that referenced this issue Sep 2, 2024
stonezdj added a commit to stonezdj/harbor that referenced this issue Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant