TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Form\Validation\BetweenValidator Class Reference
Inheritance diagram for TYPO3\CMS\Form\Validation\BetweenValidator:
TYPO3\CMS\Form\Validation\AbstractValidator TYPO3\CMS\Form\Validation\ValidatorInterface TYPO3\CMS\Form\Validation\ValidatorInterface tx_form_System_Validate_Between

Public Member Functions

 __construct ($arguments)
 
 isValid ()
 
 setMinimum ($minimum)
 
 setMaximum ($maximum)
 
 setInclusive ($inclusive)
 
- Public Member Functions inherited from TYPO3\CMS\Form\Validation\AbstractValidator
 injectRequestHandler (\TYPO3\CMS\Form\Request $requestHandler)
 
 __construct ($arguments)
 
 setFieldName ($fieldName)
 
 getFieldName ()
 
 getMessage ()
 
 getError ()
 
 setMessage ($message='', $type='TEXT')
 
 setError ($error='', $type='TEXT')
 
 setShowMessage ($show)
 
 messageMustBeDisplayed ()
 

Public Attributes

const LOCALISATION_OBJECT_NAME = 'tx_form_system_validate_between'
 

Protected Member Functions

 getLocalLanguageLabel ($type)
 
 substituteValues ($message)
 
- Protected Member Functions inherited from TYPO3\CMS\Form\Validation\AbstractValidator
 substituteValues ($message)
 
 getLocalLanguageLabel ($type)
 

Protected Attributes

 $minimum
 
 $maximum
 
 $inclusive
 
- Protected Attributes inherited from TYPO3\CMS\Form\Validation\AbstractValidator
 $fieldName
 
 $message = array()
 
 $error = array()
 
 $showMessage = TRUE
 
 $localizationHandler
 
 $requestHandler
 
 $localCobj
 

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! Between rule Value must be between the min and max. inclusively optional

Author
Patrick Broens patri.nosp@m.ck@p.nosp@m.atric.nosp@m.kbro.nosp@m.ens.n.nosp@m.l

Definition at line 23 of file BetweenValidator.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Form\Validation\BetweenValidator::__construct (   $arguments)

Constructor

Parameters
array$argumentsTyposcript configuration

Definition at line 58 of file BetweenValidator.php.

References TYPO3\CMS\Form\Validation\BetweenValidator\setMinimum().

Member Function Documentation

◆ getLocalLanguageLabel()

TYPO3\CMS\Form\Validation\BetweenValidator::getLocalLanguageLabel (   $type)
protected

Get the local language label(s) for the message Overrides the abstract

Parameters
string$typeThe type
Returns
string The local language message label
See also
::_getLocalLanguageLabel()

Definition at line 130 of file BetweenValidator.php.

References TYPO3\CMS\Form\Validation\AbstractValidator\$message.

◆ isValid()

TYPO3\CMS\Form\Validation\BetweenValidator::isValid ( )

Returns TRUE if submitted value validates according to rule

Returns
boolean
See also
::isValid()

Implements TYPO3\CMS\Form\Validation\ValidatorInterface.

Definition at line 69 of file BetweenValidator.php.

◆ setInclusive()

TYPO3\CMS\Form\Validation\BetweenValidator::setInclusive (   $inclusive)

Set boolean to make minimum and maximum value inclusive in comparison

Parameters
boolean$inclusiveTrue is inclusive
Returns
object Rule object

Definition at line 113 of file BetweenValidator.php.

References TYPO3\CMS\Form\Validation\BetweenValidator\$inclusive.

◆ setMaximum()

TYPO3\CMS\Form\Validation\BetweenValidator::setMaximum (   $maximum)

Set the maximum value

Parameters
mixed$maximumMaximum value
Returns
object Rule object

Definition at line 102 of file BetweenValidator.php.

References TYPO3\CMS\Form\Validation\BetweenValidator\$maximum.

◆ setMinimum()

TYPO3\CMS\Form\Validation\BetweenValidator::setMinimum (   $minimum)

Set the minimum value

Parameters
mixed$minimumMinimum value
Returns
object Rule object

Definition at line 91 of file BetweenValidator.php.

References TYPO3\CMS\Form\Validation\BetweenValidator\$minimum.

Referenced by TYPO3\CMS\Form\Validation\BetweenValidator\__construct().

◆ substituteValues()

TYPO3\CMS\Form\Validation\BetweenValidator::substituteValues (   $message)
protected

Substitute makers in the message text Overrides the abstract

Parameters
string$messageMessage text with markers
Returns
string Message text with substituted markers

Definition at line 147 of file BetweenValidator.php.

References TYPO3\CMS\Form\Validation\AbstractValidator\$message.

Member Data Documentation

◆ $inclusive

TYPO3\CMS\Form\Validation\BetweenValidator::$inclusive
protected

◆ $maximum

TYPO3\CMS\Form\Validation\BetweenValidator::$maximum
protected

◆ $minimum

TYPO3\CMS\Form\Validation\BetweenValidator::$minimum
protected

◆ LOCALISATION_OBJECT_NAME

const TYPO3\CMS\Form\Validation\BetweenValidator::LOCALISATION_OBJECT_NAME = 'tx_form_system_validate_between'

Definition at line 30 of file BetweenValidator.php.