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

Public Member Functions

 __construct ($arguments)
 
 isValid ()
 
 setArray ($array)
 
 setStrict ($strict)
 
- 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_inarray'
 

Protected Attributes

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

Additional Inherited Members

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

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! In array 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 InArrayValidator.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor

Parameters
array$argumentsTyposcript configuration

Definition at line 50 of file InArrayValidator.php.

References TYPO3\CMS\Form\Validation\InArrayValidator\setArray().

Member Function Documentation

◆ isValid()

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

Returns TRUE if submitted value validates according to rule

Returns
boolean
See also
::isValid()

Implements TYPO3\CMS\Form\Validation\ValidatorInterface.

Definition at line 61 of file InArrayValidator.php.

◆ setArray()

TYPO3\CMS\Form\Validation\InArrayValidator::setArray (   $array)

Set the array as haystack

Parameters
array$arrayThe haystack
Returns
object Rule object

Definition at line 77 of file InArrayValidator.php.

References TYPO3\CMS\Form\Validation\InArrayValidator\$array.

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

◆ setStrict()

TYPO3\CMS\Form\Validation\InArrayValidator::setStrict (   $strict)

Set the strict mode for the search

Parameters
boolean$strictTrue if strict
Returns
object Rule object

Definition at line 88 of file InArrayValidator.php.

References TYPO3\CMS\Form\Validation\InArrayValidator\$strict.

Member Data Documentation

◆ $array

TYPO3\CMS\Form\Validation\InArrayValidator::$array
protected

◆ $strict

TYPO3\CMS\Form\Validation\InArrayValidator::$strict
protected

◆ LOCALISATION_OBJECT_NAME

const TYPO3\CMS\Form\Validation\InArrayValidator::LOCALISATION_OBJECT_NAME = 'tx_form_system_validate_inarray'

Definition at line 29 of file InArrayValidator.php.