‪TYPO3CMS  10.4
TYPO3\CMS\Extbase\Validation\Validator\NotEmptyValidator Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Validation\Validator\NotEmptyValidator:
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=[])
 
TYPO3 CMS Extbase Error Result validate ($value)
 
array getOptions ()
 

Protected Attributes

bool $acceptsEmptyValues = false
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator
bool $acceptsEmptyValues = true
 
array $supportedOptions = array( )
 
array $options = array( )
 
TYPO3 CMS Extbase Error Result $result
 

Additional Inherited Members

- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator
 addError ($message, $code, array $arguments=[], $title='')
 
bool isEmpty ($value)
 
string null translateErrorMessage ($translateKey, $extensionName, $arguments=[])
 

Detailed Description

Validator for not empty values.

Definition at line 21 of file NotEmptyValidator.php.

Member Function Documentation

◆ isValid()

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

Checks if the given property ($propertyValue) is not empty (NULL, empty string, empty array or empty object).

Parameters
mixed$value‪The value that should be validated

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

Definition at line 35 of file NotEmptyValidator.php.

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

Member Data Documentation

◆ $acceptsEmptyValues

bool TYPO3\CMS\Extbase\Validation\Validator\NotEmptyValidator::$acceptsEmptyValues = false
protected

This validator always needs to be executed even if the given value is empty. See AbstractValidator::validate()

Definition at line 28 of file NotEmptyValidator.php.