Skip to content

Commit a5dbec5

Browse files
Potential fix for code scanning alert no. 16: Inefficient regular expression
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 316d671 commit a5dbec5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/pages/code-repositories/create-edit/create-edit-codeRepositories.validator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const aplCodeRepoApiSchema = yup.object({
3939
.required('Code repository name is a required field.')
4040
.min(2, 'Code repository name must be at least 2 characters long.')
4141
.matches(
42-
/^[a-z]([-a-z0-9]*[a-z0-9])+$/,
42+
/^[a-z][a-z0-9-]*[a-z0-9]$/,
4343
'Invalid format, must start with a lowercase letter, contain only lowercase letters, numbers, or hyphens, and end with a letter or number.',
4444
),
4545
labels: yup.object({

0 commit comments

Comments
 (0)