From f322b9ccd56b003b85962547696281742febd595 Mon Sep 17 00:00:00 2001 From: Nick-1234531 Date: Wed, 29 Oct 2025 22:01:41 +0530 Subject: [PATCH 1/3] changes to limit snapshot name length --- src/lib/schemaValidation.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/schemaValidation.ts b/src/lib/schemaValidation.ts index 3887b3d3..eaf61fab 100644 --- a/src/lib/schemaValidation.ts +++ b/src/lib/schemaValidation.ts @@ -379,7 +379,8 @@ const SnapshotSchema: JSONSchemaType = { name: { type: "string", minLength: 1, - errorMessage: "Invalid snapshot; name is mandatory and cannot be empty" + maxLength:255, + errorMessage: "Invalid snapshot; name is mandatory and cannot be empty and cannot be more than 255 characters" }, url: { type: "string", From 9dbc74288e7997b34281a27f43d78e8393a35258 Mon Sep 17 00:00:00 2001 From: Nick-1234531 Date: Wed, 29 Oct 2025 22:42:56 +0530 Subject: [PATCH 2/3] do not allow empty name --- src/lib/schemaValidation.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/schemaValidation.ts b/src/lib/schemaValidation.ts index eaf61fab..0e31904f 100644 --- a/src/lib/schemaValidation.ts +++ b/src/lib/schemaValidation.ts @@ -380,6 +380,7 @@ const SnapshotSchema: JSONSchemaType = { type: "string", minLength: 1, maxLength:255, + pattern: "^.*\\S.*$", errorMessage: "Invalid snapshot; name is mandatory and cannot be empty and cannot be more than 255 characters" }, url: { From 349a69d1e69baa6ccc3bcea322fcdee9757581e0 Mon Sep 17 00:00:00 2001 From: Nikhil Goyal Date: Thu, 30 Oct 2025 17:10:07 +0530 Subject: [PATCH 3/3] Apply suggestion from @sushobhit-lt Co-authored-by: Sushobhit Dua <38429226+sushobhit-lt@users.noreply.github.com> --- src/lib/schemaValidation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/schemaValidation.ts b/src/lib/schemaValidation.ts index 0e31904f..cbdc3c81 100644 --- a/src/lib/schemaValidation.ts +++ b/src/lib/schemaValidation.ts @@ -381,7 +381,7 @@ const SnapshotSchema: JSONSchemaType = { minLength: 1, maxLength:255, pattern: "^.*\\S.*$", - errorMessage: "Invalid snapshot; name is mandatory and cannot be empty and cannot be more than 255 characters" + errorMessage: "Invalid snapshot: name is mandatory, cannot be empty, and must not exceed 255 characters." }, url: { type: "string",