diff --git a/src/components/shared/basic/ReleaseProcess/OfferCard/index.tsx b/src/components/shared/basic/ReleaseProcess/OfferCard/index.tsx index 7c2970fe6..f6250ab59 100644 --- a/src/components/shared/basic/ReleaseProcess/OfferCard/index.tsx +++ b/src/components/shared/basic/ReleaseProcess/OfferCard/index.tsx @@ -458,9 +458,9 @@ export default function OfferCard() { ? getValues().shortDescriptionEN.length : getValues().shortDescriptionDE.length) + '/120' } - patternKey="shortDescriptionEN" - patternEN={Patterns.offerCard.shortDescriptionEN} - patternDE={Patterns.offerCard.shortDescriptionDE} + patternKey="shortDescription" + patternEN={Patterns.offerCard.shortDescription} + patternDE={Patterns.offerCard.shortDescription} isRequired={true} rules={{ required: @@ -471,11 +471,7 @@ export default function OfferCard() { )}`, pattern: `${t( 'serviceReleaseForm.validCharactersIncludes' - )} ${ - desc === 'shortDescriptionEN' - ? 'a-zA-Z0-9 !?@&#\'"()_-=/*.,;:' - : 'a-zA-ZÀ-ÿ0-9 !?@&#\'"()_-=/*.,;:' - }`, + )} ${'a-zA-ZÀ-ÿ0-9 !?@&#\'"()_-=/*.,;:'}`, maxLength: `${t('serviceReleaseForm.maximum')} 120 ${t( 'serviceReleaseForm.charactersAllowed' )}`, diff --git a/src/components/shared/basic/ReleaseProcess/OfferPage/index.tsx b/src/components/shared/basic/ReleaseProcess/OfferPage/index.tsx index c607d6594..65450105a 100644 --- a/src/components/shared/basic/ReleaseProcess/OfferPage/index.tsx +++ b/src/components/shared/basic/ReleaseProcess/OfferPage/index.tsx @@ -301,8 +301,8 @@ export default function OfferPage({ `/${longDescriptionMaxLength}` } patternKey="longDescriptionEN" - patternEN={Patterns.offerPage.longDescriptionEN} - patternDE={Patterns.offerPage.longDescriptionDE} + patternEN={Patterns.offerPage.longDescription} + patternDE={Patterns.offerPage.longDescription} rules={{ maxLength: `${t( 'serviceReleaseForm.maximum' @@ -317,11 +317,7 @@ export default function OfferPage({ )}`, pattern: `${t( 'serviceReleaseForm.validCharactersIncludes' - )} ${ - longDesc === 'longDescriptionEN' - ? 'a-zA-Z0-9 !?@&#\'"()[]_-+=<>/*.,;:' - : 'a-zA-ZÀ-ÿ0-9 !?@&#\'"()[]_-+=<>/*.,;:' - }`, + )} ${'a-zA-ZÀ-ÿ0-9 !?@&#\'"()[]_-+=<>/*.,;:'}`, }} maxLength={longDescriptionMaxLength} /> diff --git a/src/types/Patterns.ts b/src/types/Patterns.ts index d8a38773c..7fbd17d46 100644 --- a/src/types/Patterns.ts +++ b/src/types/Patterns.ts @@ -75,14 +75,10 @@ export const Patterns = { offerCard: { serviceName: /^[^-\s()'"#@.&](?!.*[%&?,';:!\s-]{2}).{2,200}$/, serviceType: /^([A-Za-z])$/, - shortDescriptionEN: /^[^-\s()'"#@.&](?!.*[%&?,';:!\s-]{2}).{10,120}$/, - shortDescriptionDE: /^[^-\s()'"#@.&](?!.*[%&?,';:!\s-]{2}).{10,120}$/, + shortDescription: /^.{10,120}$/, }, offerPage: { - longDescriptionEN: - /^[^ @=<>*\-+#?%&_:;]([a-zA-Z0-9 !?@&#'"()[\]_\-+=<>/*.,;:%\r\n]){9,1999}$/, - longDescriptionDE: - /^[^ @=<>*\-+#?%&_:;]([a-zA-Z0-9 !?@&#'"()[\]_\-+=<>/*.,;:%\r\n]){9,1999}$/, + longDescription: /^.{9,1999}$/, }, appPage: { longDescriptionEN: