‪TYPO3CMS  10.4
TYPO3\CMS\Extbase\Validation\Validator\NumberRangeValidator Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Validation\Validator\NumberRangeValidator:
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

array $supportedOptions
 
- ‪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 general numbers

Definition at line 21 of file NumberRangeValidator.php.

Member Function Documentation

◆ isValid()

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

The given value is valid if it is a number in the specified range.

Parameters
mixed$value‪The value that should be validated

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

Definition at line 35 of file NumberRangeValidator.php.

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

Member Data Documentation

◆ $supportedOptions

array TYPO3\CMS\Extbase\Validation\Validator\NumberRangeValidator::$supportedOptions
protected
Initial value:
= array(
'minimum' => [0, 'The minimum value to accept', 'integer'],
'maximum' => [PHP_INT_MAX, 'The maximum value to accept', 'integer']
)

Definition at line 25 of file NumberRangeValidator.php.