From ec22aae9cca81c6cbd8b000f2ded42e096a7a5f3 Mon Sep 17 00:00:00 2001 From: Georg Ringer Date: Tue, 11 Jun 2024 09:28:32 +0200 Subject: [PATCH] [BUGFIX] Force to be field not empty --- Classes/Form/CustomFormElement.php | 17 +++++++++++++++++ Configuration/Yaml/FormSetup.yaml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 Classes/Form/CustomFormElement.php diff --git a/Classes/Form/CustomFormElement.php b/Classes/Form/CustomFormElement.php new file mode 100644 index 0000000..df2b471 --- /dev/null +++ b/Classes/Form/CustomFormElement.php @@ -0,0 +1,17 @@ +addValidator(GeneralUtility::makeInstance(NotEmptyValidator::class)); + } +} diff --git a/Configuration/Yaml/FormSetup.yaml b/Configuration/Yaml/FormSetup.yaml index ebd49ff..2846b6f 100644 --- a/Configuration/Yaml/FormSetup.yaml +++ b/Configuration/Yaml/FormSetup.yaml @@ -30,7 +30,7 @@ TYPO3: Friendlycaptcha: - implementationClassName: 'TYPO3\CMS\Form\Domain\Model\FormElements\GenericFormElement' + implementationClassName: 'StudioMitte\FriendlyCaptcha\Form\CustomFormElement' # Headline (appears as a title in the overview and above the form) formEditor: