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:
committed by
GitHub
parent
8ec1badb43
commit
9f72e2efd9
@@ -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]+)*)$',
|
||||
};
|
||||
|
||||
@@ -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)}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user