From df3e1d7df47b7ab6aac4ae5a59f8f5d853383e48 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 29 Jun 2023 14:20:55 +0200 Subject: [PATCH] captcha schema --- backend/src/api/routes/quotes.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/api/routes/quotes.ts b/backend/src/api/routes/quotes.ts index 1ca025f41..9ad72098a 100644 --- a/backend/src/api/routes/quotes.ts +++ b/backend/src/api/routes/quotes.ts @@ -45,7 +45,10 @@ router.post( .string() .regex(/^[\w+]+$/) .required(), - captcha: joi.string().required(), + captcha: joi + .string() + .regex(/[\w-_]+/) + .required(), }, validationErrorMessage: "Please fill all the fields", }),