From 8273a8a15e6f2ad6d4d03ea02ea4c3d31dbe3072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Schu=CC=88tz?= Date: Sat, 18 Sep 2021 14:42:37 +0200 Subject: [PATCH 1/2] TASK: Added validations and a better description --- Configuration/NodeTypes.yaml | 6 ++++++ Resources/Private/Translations/de/NodeTypes/AnchorMixin.xlf | 4 ++-- Resources/Private/Translations/en/NodeTypes/AnchorMixin.xlf | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Configuration/NodeTypes.yaml b/Configuration/NodeTypes.yaml index 1b3a198..59d51df 100644 --- a/Configuration/NodeTypes.yaml +++ b/Configuration/NodeTypes.yaml @@ -20,3 +20,9 @@ group: anchor help: message: i18n + validation: + 'Neos.Neos/Validation/StringLengthValidator': + minimum: 1 + maximum: 255 + 'Neos.Neos/Validation/RegularExpressionValidator': + regularExpression: '/^[a-z0-9\-]+$/i' diff --git a/Resources/Private/Translations/de/NodeTypes/AnchorMixin.xlf b/Resources/Private/Translations/de/NodeTypes/AnchorMixin.xlf index 7e7d898..ab7e0b6 100644 --- a/Resources/Private/Translations/de/NodeTypes/AnchorMixin.xlf +++ b/Resources/Private/Translations/de/NodeTypes/AnchorMixin.xlf @@ -11,8 +11,8 @@ Abschnitts-ID - Fill in the section id, save and click the button below to copy the link to this node. You can paste it like any other link in the text editor or in inspector fields. - Abschnitts-ID eingeben, speichern und den unter dem Feld erscheinenden Button klicken um den Link zu diesem Element zu kopieren. Dieser kann wie jeder andere Link im Texteditor oder in Feldern des Inspektors eingefügt werden. + Enter a section ID of the type short-text-without-special-characters. After you click Save, a button for copying the link appears below it. This link can be pasted in the text editor or in fields of the Inspector and will lead directly to the section. + Gib eine Abschnitts-ID in der Art kurzer-text-ohne-sonderzeichen ein. Nachdem du auf Speichern klickst, erscheint darunter ein Button zum Kopieren des Links. Dieser Link im Texteditor oder in Feldern des Inspektors eingefügt werden und führt direkt zum Abschnitt. diff --git a/Resources/Private/Translations/en/NodeTypes/AnchorMixin.xlf b/Resources/Private/Translations/en/NodeTypes/AnchorMixin.xlf index ff16c3e..18b2352 100644 --- a/Resources/Private/Translations/en/NodeTypes/AnchorMixin.xlf +++ b/Resources/Private/Translations/en/NodeTypes/AnchorMixin.xlf @@ -9,7 +9,7 @@ Section id - Fill in the section id, save and click the button below to copy the link to this node. You can paste it like any other link in the text editor or in inspector fields. + Enter a section ID of the type short-text-without-special-characters. After you click Save, a button for copying the link appears below it. This link can be pasted in the text editor or in fields of the Inspector and will lead directly to the section. From c3fbcb3e200d261569dcfcbb81f94cf7fc6e31d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Schu=CC=88tz?= Date: Mon, 20 Sep 2021 10:31:37 +0200 Subject: [PATCH 2/2] BUGFIX: A hash needs to start with a char --- Configuration/NodeTypes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configuration/NodeTypes.yaml b/Configuration/NodeTypes.yaml index 59d51df..682a1eb 100644 --- a/Configuration/NodeTypes.yaml +++ b/Configuration/NodeTypes.yaml @@ -25,4 +25,4 @@ minimum: 1 maximum: 255 'Neos.Neos/Validation/RegularExpressionValidator': - regularExpression: '/^[a-z0-9\-]+$/i' + regularExpression: '/^[a-z][a-z0-9\-]*$/i'