From 02bfc729dd93e8c5be683d6ec282b344b1cb20d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Tue, 10 Dec 2024 11:13:58 +0100 Subject: [PATCH] fix(#2044): fix missing validation for url length --- CHANGELOG.md | 1 + .../organisms/VoteContext/VoteContextStoringInformation.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9628fd1b..315654eef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ changes. ### Fixed - Fix mzero parsing error on fetching the /proposal/list [Issue 2446](https://github.com/IntersectMBO/govtool/issues/2446) +- Fix storing url missing length validation [Issue 2044](https://github.com/IntersectMBO/govtool/issues/2044) ### Changed diff --git a/govtool/frontend/src/components/organisms/VoteContext/VoteContextStoringInformation.tsx b/govtool/frontend/src/components/organisms/VoteContext/VoteContextStoringInformation.tsx index c4ff3e53b..953528fba 100644 --- a/govtool/frontend/src/components/organisms/VoteContext/VoteContextStoringInformation.tsx +++ b/govtool/frontend/src/components/organisms/VoteContext/VoteContextStoringInformation.tsx @@ -7,7 +7,7 @@ import { ICONS } from "@consts"; import { useTranslation, useScreenDimension, useVoteContextForm } from "@hooks"; import { Step } from "@molecules"; import { ControlledField, VoteContextWrapper } from "@organisms"; -import { URL_REGEX, openInNewTab } from "@utils"; +import { URL_REGEX, isValidURLLength, openInNewTab } from "@utils"; import { LINKS } from "@/consts/links"; type VoteContextStoringInformationProps = { @@ -144,6 +144,7 @@ export const VoteContextStoringInformation = ({ value: URL_REGEX, message: t("createGovernanceAction.fields.validations.url"), }, + validate: isValidURLLength, }} /> }