From 19cf335e15eff84b024d5431e164059c5590ebd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Wed, 6 Nov 2024 19:52:18 +0100 Subject: [PATCH] feat(#2276): add support for space in given name --- CHANGELOG.md | 1 + .../EditDRepInfoSteps/EditDRepStorageInformation.tsx | 2 +- .../organisms/RegisterAsDRepSteps/DRepStorageInformation.tsx | 2 +- govtool/frontend/src/consts/dRepActions/fields.ts | 4 ---- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a31aeeece..642e7f2c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ changes. - Change multilanguage support to use json file [Issue 2325](https://github.com/IntersectMBO/govtool/issues/2325) - Display full Governance Action IDs on desktop +- Support space on given name [Issue 2276](https://github.com/IntersectMBO/govtool/issues/2276) ### Removed diff --git a/govtool/frontend/src/components/organisms/EditDRepInfoSteps/EditDRepStorageInformation.tsx b/govtool/frontend/src/components/organisms/EditDRepInfoSteps/EditDRepStorageInformation.tsx index 1102b8b72..8739557ea 100644 --- a/govtool/frontend/src/components/organisms/EditDRepInfoSteps/EditDRepStorageInformation.tsx +++ b/govtool/frontend/src/components/organisms/EditDRepInfoSteps/EditDRepStorageInformation.tsx @@ -33,7 +33,7 @@ export const EditDRepStorageInformation = ({ } = useEditDRepInfoForm(setStep); const { screenWidth } = useScreenDimension(); - const fileName = getValues("givenName").replace(/\s/g, ""); + const fileName = getValues("givenName"); const openGuideAboutStoringInformation = () => openInNewTab( "https://docs.gov.tools/using-govtool/govtool-functions/storing-information-offline", diff --git a/govtool/frontend/src/components/organisms/RegisterAsDRepSteps/DRepStorageInformation.tsx b/govtool/frontend/src/components/organisms/RegisterAsDRepSteps/DRepStorageInformation.tsx index 0e7557513..c36e73667 100644 --- a/govtool/frontend/src/components/organisms/RegisterAsDRepSteps/DRepStorageInformation.tsx +++ b/govtool/frontend/src/components/organisms/RegisterAsDRepSteps/DRepStorageInformation.tsx @@ -33,7 +33,7 @@ export const DRepStorageInformation = ({ } = useRegisterAsdRepForm(setStep); const { screenWidth } = useScreenDimension(); - const fileName = getValues("givenName").replace(/\s/g, ""); + const fileName = getValues("givenName"); const openGuideAboutStoringInformation = () => openInNewTab( diff --git a/govtool/frontend/src/consts/dRepActions/fields.ts b/govtool/frontend/src/consts/dRepActions/fields.ts index 430cf2668..7054ce326 100644 --- a/govtool/frontend/src/consts/dRepActions/fields.ts +++ b/govtool/frontend/src/consts/dRepActions/fields.ts @@ -13,10 +13,6 @@ export const Rules = { maxLength: 80, }), }, - pattern: { - value: /^[^\s]+$/, - message: i18n.t("registration.fields.validations.noSpaces"), - }, }, LINK_DESCRIPTION: { maxLength: {