Skip to content

Commit dc15ecd

Browse files
authored
fix: fixed escape character issue in regular expressions (#391)
1 parent 47163d8 commit dc15ecd

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

modules/v2/metadata.display.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ spec:
5858
working_dir:
5959
name: working_dir
6060
title: Working Dir
61-
regexValidation: ^(/[^/ ]+)*\/?$
61+
regexValidation: "^(/[^/ ]+)*/?$"
6262
validation: Must be an absolute path (e.g., /app/src).
6363
volume_mounts:
6464
name: volume_mounts
@@ -73,7 +73,7 @@ spec:
7373
mount_path:
7474
name: mount_path
7575
title: Mount Path
76-
regexValidation: ^(/[^/ ]+)*\/?$
76+
regexValidation: "^(/[^/ ]+)*/?$"
7777
validation: Mount path must be an absolute path (e.g., /mnt/data).
7878
resources:
7979
name: resources
@@ -100,7 +100,7 @@ spec:
100100
name: memory
101101
title: Memory
102102
subtext: Memory to allocate to each instance of this container
103-
regexValidation: ^([5-9][0-9][0-9]Mi|[1-2]?[0-9]Gi|3[0-2]Gi|[1-9][0-9]Mi|[1-9]Gi|[1-9]M|[1-2]G)$
103+
regexValidation: ^[0-9]+(Mi|Gi|M|G)$
104104
validation: Must be a valid memory size with unit, such as Mi, Gi, M, or G
105105
nvidia_gpu:
106106
name: nvidia_gpu
@@ -147,7 +147,7 @@ spec:
147147
name: path
148148
title: Path
149149
subtext: "Path to access on the HTTP server. Ex: e.g./reddy"
150-
regexValidation: ^(/[^/ ]+)*/?$
150+
regexValidation: "^(/[^/ ]+)*/?$"
151151
validation: Path must be a valid URL path (e.g., /health).
152152
port:
153153
name: port
@@ -208,7 +208,7 @@ spec:
208208
name: path
209209
title: Path
210210
subtext: Path to access on HTTP server
211-
regexValidation: ^(/[^/ ]+)*/?$
211+
regexValidation: "^(/[^/ ]+)*/?$"
212212
validation: Path must be a valid URL path (e.g., /health).
213213
port:
214214
name: port
@@ -259,7 +259,7 @@ spec:
259259
custom_audiences:
260260
name: custom_audiences
261261
title: Custom Audiences
262-
regexValidation: ^https?://(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[A-Za-z]{2,}(?:/[^\s]*)?$
262+
regexValidation: "^https?://(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?.)+[A-Za-z]{2,}(?:/[^s]*)?$"
263263
validation: Custom audience must be a valid URL starting with 'http://' or 'https://'
264264
description:
265265
name: description
@@ -278,7 +278,7 @@ spec:
278278
name: encryption_key
279279
title: Encryption Key
280280
level: 1
281-
regexValidation: ^projects/[A-Za-z0-9\-\_]+/locations/[A-Za-z0-9\-\_]+/keyRings/[A-Za-z0-9\-\_]+/cryptoKeys/[A-Za-z0-9\-\_]+$
281+
regexValidation: "^projects/[A-Za-z0-9_-]+/locations/[A-Za-z0-9_-]+/keyRings/[A-Za-z0-9_-]+/cryptoKeys/[A-Za-z0-9_-]+$"
282282
validation: Encryption key must be in the format projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}.
283283
execution_environment:
284284
name: execution_environment
@@ -357,7 +357,7 @@ spec:
357357
name: service_account_project_roles
358358
title: Service Account Project Roles
359359
level: 1
360-
regexValidation: ^(?:[a-z][a-z0-9-]{4,29}/)?roles/[a-zA-Z0-9_.]+$
360+
regexValidation: "^(?:[a-z][a-z0-9-]{4,29}/)?roles/[a-zA-Z0-9_.]+$"
361361
validation: Role must be in the format roles/{role_name}.
362362
service_annotations:
363363
name: service_annotations
@@ -465,7 +465,7 @@ spec:
465465
name: path
466466
title: Path
467467
subtext: "Example format (parent secret): \"projects/project-number/secrets/secret-name\""
468-
regexValidation: ^(?:[A-Za-z0-9_-]|\.[A-Za-z0-9_-])+(?:/(?:[A-Za-z0-9_-]|\.[A-Za-z0-9_-])+)*$
468+
regexValidation: "^(.{1,2}/)?([A-Za-z0-9_.-]+/)*[A-Za-z0-9_.-]+$"
469469
validation: Path must be a valid relative file path.
470470
version:
471471
name: version
@@ -511,14 +511,14 @@ spec:
511511
server:
512512
name: server
513513
title: Server
514-
subtext: The IP address or domain of your NFS server
515-
regexValidation: ^(([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?\.)*[a-zA-Z]{2,}|((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9]))$
516-
validation: Must be a valid IP address or domain name.
514+
subtext: The IP address or hostname of your NFS server
515+
regexValidation: "^(([a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?.)*[a-zA-Z]{2,}|([0-9]{1,3}.){3}[0-9]{1,3})$"
516+
validation: Must be a valid IP address or hostname.
517517
path:
518518
name: path
519519
title: Path
520520
subtext: The path to the NFS server directory you want to mount
521-
regexValidation: ^(/[^/ ]+)*/?$
521+
regexValidation: "^(/[^/ ]+)*/?$"
522522
validation: Path must be an absolute path (e.g., /exports/data).
523523
read_only:
524524
name: read_only
@@ -546,7 +546,7 @@ spec:
546546
name: connector
547547
title: Connector
548548
subtext: VPC Access connector name.
549-
regexValidation: ^projects/(?:[a-z][a-z0-9-]*[a-z0-9]|[0-9]+)/locations/([a-z0-9-]+)/connectors/([a-z][a-z0-9-]*[a-z0-9])$
549+
regexValidation: "^projects/(?:[a-z][a-z0-9-]*[a-z0-9]|[0-9]+)/locations/([a-z0-9-]+)/connectors/([a-z][a-z0-9-]*[a-z0-9])$"
550550
validation: Invalid connector name. It must be in the format projects/{project}/locations/{location}/connectors/{connector}
551551
network_interfaces:
552552
name: network_interfaces

0 commit comments

Comments
 (0)