intellij-openshift-connector icon indicating copy to clipboard operation
intellij-openshift-connector copied to clipboard

Validation for new project name doesn't allow multiple symbols after hyphen in name

Open martinszuc opened this issue 7 months ago • 0 comments

What did you run exactly?

  • Dialog for creating a new project/namespace says that Must be alphanumeric and may contain - but current regex pattern has restriction on having exactly one character after a hyphen or dot.

Screencast from 2024-07-08 17-14-06.webm

  • Another issue may arise when we use a dot instead of hyphen which is allowed by the pattern but throws Create Project error:

Screencast from 2024-07-08 17-28-39.webm

I suggest pattern "^[a-z0-9]+(?:-[a-z0-9]+)*$" to get rid of dot and follow the requirements:

  • Contain at most 63 characters
  • Contain only lowercase alphanumeric characters or ‘-’
  • Start with an alphanumeric character
  • End with an alphanumeric character

Screencast from 2024-07-08 17-42-01.webm

martinszuc avatar Jul 08 '24 15:07 martinszuc