public function evaluateFieldValue($value)
    {
        $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('ke_search');
        $minLength = isset($extConf['searchWordLength']) ? (int) $extConf['searchWordLength'] : 4;

        if (strlen($value) < $minLength) {
            /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $message */
            $message = GeneralUtility::makeInstance(
                \TYPO3\CMS\Core\Messaging\FlashMessage::class,
                $this->translate('tag_too_short_message', [$value, $minLength]),
                $this->translate('tag_too_short'),
                \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
                true
            );

            /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
            $flashMessageService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessageService::class);
            $flashMessageService->getMessageQueueByIdentifier()->addMessage($message);
            return false;
        }
        return $value;
    }
public function evaluateFieldValue($value)
    {
        $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('ke_search');
        $minLength = isset($extConf['searchWordLength']) ? (int) $extConf['searchWordLength'] : 4;

        if (strlen($value) < $minLength) {
            /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $message */
            $message = GeneralUtility::makeInstance(
                \TYPO3\CMS\Core\Messaging\FlashMessage::class,
                $this->translate('tag_too_short_message', [$value, $minLength]),
                $this->translate('tag_too_short'),
                \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
                true
            );

            /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
            $flashMessageService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessageService::class);
            $flashMessageService->getMessageQueueByIdentifier()->addMessage($message);
            return false;
        }
        return $value;
    }
public function evaluateFieldValue ( $ value ) { $ extConf = GeneralUtility :: makeInstance ( ExtensionConfiguration :: class ) -> get ( 'ke_search' ) ; $ minLength = isset ( $ extConf [ 'searchWordLength' ] ) ? ( int ) $ extConf [ 'searchWordLength' ] : 4 ; if ( strlen ( $ value ) < $ minLength ) { /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $message */ $ message = GeneralUtility :: makeInstance ( \ TYPO3 \ CMS \ Core \ Messaging \ FlashMessage :: class , $ this -> translate ( 'tag_too_short_message' , [ $ value , $ minLength ] ) , $ this -> translate ( 'tag_too_short' ) , \ TYPO3 \ CMS \ Core \ Messaging \ FlashMessage :: ERROR , true ) ; /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */ $ flashMessageService = GeneralUtility :: makeInstance ( \ TYPO3 \ CMS \ Core \ Messaging \ FlashMessageService :: class ) ; $ flashMessageService -> getMessageQueueByIdentifier ( ) -> addMessage ( $ message ) ; return false ; } return $ value ; }
PHP Validation to disallow leading numbers

@param string $value
@return mixed|string Updated string, which fits the requirements
PHP Validation to disallow leading numbers