Skip to content

Commit dfbe5fc

Browse files
committed
Update regex.ts
1 parent 8d7b806 commit dfbe5fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib/api/validations/regex.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
// Matches project or workspace names: 1-63 chars per segment, alphanum/dash, dot-separated, no leading/trailing dash, allows uppercase.
12
export const projectWorkspaceNameRegex =
23
/^(?!-)[a-zA-Z0-9-]{1,63}(?<!-)(?:\.(?!-)[a-zA-Z0-9-]{1,63}(?<!-))*$/;
4+
5+
// Matches managed control plane names: 1-63 chars per segment, lowercase alphanum/dash, dot-separated, no leading/trailing dash.
36
export const managedControlPlaneNameRegex =
47
/^(?!-)[a-z0-9-]{1,63}(?<!-)(?:\.(?!-)[a-z0-9-]{1,63}(?<!-))*$/;

0 commit comments

Comments
 (0)