From 96b8e8a2ccbb8b2295ab41f66d38bfa5763e4e97 Mon Sep 17 00:00:00 2001 From: BurakYs Date: Sun, 26 May 2024 15:33:21 +0300 Subject: [PATCH] add max length to URLSchema --- src/models/URL.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/models/URL.ts b/src/models/URL.ts index e1b9c36..030e8af 100644 --- a/src/models/URL.ts +++ b/src/models/URL.ts @@ -14,6 +14,7 @@ const URLSchema = new Schema({ url: { type: String, required: true, + maxlength: 4096, validate: { validator: urlValidation, message: (props: ValidatorProps) => props.reason?.message || ''