code: public function validateAdditionalFields(array &$submittedData, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject)
      {
          $result = true;
  
          // Check for valid directories
          $directories = GeneralUtility::trimExplode(LF, $submittedData['scheduler_batchResize_directories'], true);
          foreach ($directories as $directory) {
              $absoluteDirectory = GeneralUtility::getFileAbsFileName($directory);
              if (!@is_dir($absoluteDirectory)) {
                  $result = false;
                  $parentObject->addMessage(
                      sprintf(
                          $GLOBALS['LANG']->sL('LLL:EXT:image_autoresize/Resources/Private/Language/locallang_mod.xlf:msg.invalidDirectories'),
                          $directory
                      ),
                      \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
                  );
              }
          }
  
          $directories = GeneralUtility::trimExplode(LF, $submittedData['scheduler_batchResize_excludeDirectories'], true);
          foreach ($directories as $directory) {
              $absoluteDirectory = GeneralUtility::getFileAbsFileName($directory);
              if (!@is_dir($absoluteDirectory)) {
                  $result = false;
                  $parentObject->addMessage(
                      sprintf(
                          $GLOBALS['LANG']->sL('LLL:EXT:image_autoresize/Resources/Private/Language/locallang_mod.xlf:msg.invalidExcludeDirectories'),
                          $directory
                      ),
                      \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
              }
          }
  
          return $result;
      }
docs: Checks if the given value is a string
  
  @param array $submittedData Reference to the array containing the data submitted by the user
  @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject Reference to the calling object (Scheduler's BE module)
  @return boolean true if validation was ok (or selected class is not relevant), false otherwise