TYPO3 CMS  TYPO3_6-2
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 Tx_Extbase_Validation_Validator_TextValidator

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! 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().