TYPO3 CMS  TYPO3_7-6
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 ($value)
 
- Public Member Functions inherited from TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator
 __construct (array $options=[])
 
 validate ($value)
 
 getOptions ()
 

Additional Inherited Members

- Protected Member Functions inherited from TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator
 isValid ($value)
 
 addError ($message, $code, array $arguments=[], $title='')
 
 isEmpty ($value)
 
 translateErrorMessage ($translateKey, $extensionName, $arguments=[])
 
- Protected Attributes inherited from TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator
 $acceptsEmptyValues = true
 
 $supportedOptions = []
 
 $options = []
 
 $result
 

Detailed Description

Validator for "plain" text.

Definition at line 22 of file TextValidator.php.

Member Function Documentation

◆ isValid()

TYPO3\CMS\Extbase\Validation\Validator\TextValidator::isValid (   $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.

See http://php.net/filter_var for details.

Parameters
mixed$valueThe value that should be validated
Returns
void

Definition at line 37 of file TextValidator.php.

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