Skip to content

Commit ca7bb38

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/workloads/create-edit/create-edit-workloads.validator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const createAplWorkloadApiResponseSchema = yup.object({
7171
.required('Workload name is required')
7272
.min(4, 'Workload name must be at least 4 characters')
7373
.max(16, 'Workload name must not exceed 16 characters')
74-
.matches(/^[a-z]([-a-z0-9]*[a-z0-9])+$/, 'Workload name cannot contain capital letters or underscores'),
74+
.matches(/^[a-z]([-a-z0-9]*[a-z0-9])?$/, 'Workload name cannot contain capital letters or underscores'),
7575
labels: yup.object({
7676
'apl.io/teamId': yup.string().required(),
7777
}),

0 commit comments

Comments
 (0)