From e40cfaefa4295af0b529527f0e0f93fa35d83496 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 49f30c36c..f5816f878 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ changes. - Fix mzero parsing error on fetching the /proposal/list [Issue 2446](https://github.com/IntersectMBO/govtool/issues/2446) - Fix scaling gov action votes on lower resolutions +- 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, }} /> }