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

Public Member Functions

 __construct ($arguments)
 
 isValid ()
 
 setMinimum ($minimum)
 
 setMaximum ($maximum)
 
- 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_length'
 

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
 
 $charsetConverter = NULL
 
- 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! Length rule

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

Definition at line 22 of file LengthValidator.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor

Parameters
array$argumentsTyposcript configuration

Definition at line 57 of file LengthValidator.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Form\Validation\LengthValidator\setMinimum().

Member Function Documentation

◆ getLocalLanguageLabel()

TYPO3\CMS\Form\Validation\LengthValidator::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 117 of file LengthValidator.php.

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

◆ isValid()

TYPO3\CMS\Form\Validation\LengthValidator::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 LengthValidator.php.

◆ setMaximum()

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

Set the maximum value

Parameters
integer$maximumMaximum value
Returns
object Rule object

Definition at line 100 of file LengthValidator.php.

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

◆ setMinimum()

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

Set the minimum value

Parameters
integer$minimumMinimum value
Returns
object Rule object

Definition at line 89 of file LengthValidator.php.

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

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

◆ substituteValues()

TYPO3\CMS\Form\Validation\LengthValidator::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 134 of file LengthValidator.php.

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

Member Data Documentation

◆ $charsetConverter

TYPO3\CMS\Form\Validation\LengthValidator::$charsetConverter = NULL
protected

Definition at line 50 of file LengthValidator.php.

◆ $maximum

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

◆ $minimum

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

◆ LOCALISATION_OBJECT_NAME

const TYPO3\CMS\Form\Validation\LengthValidator::LOCALISATION_OBJECT_NAME = 'tx_form_system_validate_length'

Definition at line 29 of file LengthValidator.php.