1
0
mirror of https://github.com/quay/quay.git synced 2026-01-26 06:21:37 +03:00

ui: Update regex pattern helper text for validating team name (PROJQUAY-8110) (#3353)

* ui: update regex pattern in helpertext for team name(PROJQUAY-8110)

Signed-off-by: harishsurf <hgovinda@redhat.com>

* old ui: update regex pattern for validating team name

---------

Signed-off-by: harishsurf <hgovinda@redhat.com>
This commit is contained in:
Harish Govindarajulu
2024-10-21 14:19:55 -04:00
committed by GitHub
parent 8ec1badb43
commit 9f72e2efd9
4 changed files with 4 additions and 4 deletions

View File

@@ -2,7 +2,7 @@
* Regex patterns to for validating account names.
*/
export const NAME_PATTERNS: any = {
TEAM_PATTERN: '^[a-z][a-z0-9]+$',
TEAM_PATTERN: '^([a-z0-9]+(?:[._-][a-z0-9]+)*)$',
ROBOT_PATTERN: '^[a-z][a-z0-9_]{1,254}$',
USERNAME_PATTERN: '^(?=.{2,255}$)([a-z0-9]+(?:[._-][a-z0-9]+)*)$',
};

View File

@@ -166,7 +166,7 @@ export default function CreatePermissionDrawer(
nameLabel="Provide a name for your new team:"
descriptionLabel="Provide an optional description for your new team"
helperText="Enter a description to provide extra information to your teammates about this team:"
nameHelperText="Choose a name to inform your teammates about this team. Must match ^[a-z][a-z0-9]+$."
nameHelperText="Choose a name to inform your teammates about this team. Must match ^([a-z0-9]+(?:[._-][a-z0-9]+)*)$"
isModalOpen={isTeamModalOpen}
handleModalToggle={() => setIsTeamModalOpen(!isTeamModalOpen)}
handleWizardToggle={() => setIsTeamWizardOpen(!isTeamWizardOpen)}

View File

@@ -54,7 +54,7 @@ export default function TeamsAndMembershipList() {
nameLabel="Provide a name for your new team:"
descriptionLabel="Provide an optional description for your new team"
helperText="Enter a description to provide extra information to your teammates about this team:"
nameHelperText="Choose a name to inform your teammates about this team. Must match ^[a-z][a-z0-9]+$."
nameHelperText="Choose a name to inform your teammates about this team. Must match ^([a-z0-9]+(?:[._-][a-z0-9]+)*)$"
isModalOpen={isTeamModalOpen}
handleModalToggle={() => {
setIsTeamModalOpen(!isTeamModalOpen);

View File

@@ -125,7 +125,7 @@ export default function RepositoryDetails() {
nameLabel="Provide a name for your new team:"
descriptionLabel="Provide an optional description for your new team"
helperText="Enter a description to provide extra information to your teammates about this team:"
nameHelperText="Choose a name to inform your teammates about this team. Must match ^[a-z][a-z0-9]+$."
nameHelperText="Choose a name to inform your teammates about this team. Must match ^([a-z0-9]+(?:[._-][a-z0-9]+)*)$"
isModalOpen={isTeamModalOpen}
handleModalToggle={() => setIsTeamModalOpen(!isTeamModalOpen)}
validateName={validateTeamName}