‪TYPO3CMS  ‪main
TYPO3\CMS\Extbase\Validation\Validator\TextValidator Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Validation\Validator\TextValidator:
TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface

Public Member Functions

 isValid (mixed $value)
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator
 setOptions (array $options)
 validate (mixed $value)
 getOptions ()

Additional Inherited Members

- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator
 addError (string $message, int $code, array $arguments=[], string $title='')
 addErrorForProperty (string|array $propertyPath, string $message, int $code, array $arguments=[], string $title='')
 isEmpty (mixed $value)
 translateErrorMessage (string $translateKey, string $extensionName, array $arguments=[])
 initializeDefaultOptions (array $options)
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator
bool $acceptsEmptyValues = true
array $supportedOptions = array( )
array $options = []
Result $result

Detailed Description

Validator for "plain" text.

Definition at line 23 of file TextValidator.php.

Member Function Documentation

◆ isValid()

TYPO3\CMS\Extbase\Validation\Validator\TextValidator::isValid ( mixed  $value)

Checks if the given value is a valid text (contains no XML tags).

Be aware that the value of this check entirely depends on the output context. The validated text is not expected to be secure in every circumstance, if you want to be sure of that, use a customized regular expression or filter on output.

Reimplemented from TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator.

Definition at line 32 of file TextValidator.php.

References TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator\addError(), and TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator\translateErrorMessage().