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

Public Member Functions

 __construct ($arguments)
 
 isValid ()
 
 setRegularExpression ($expression)
 
- 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_regexp'
 

Protected Attributes

 $regularExpression
 
- 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! Regexp 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 RegExpValidator.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor

Parameters
array$argumentsTyposcript configuration

Definition at line 43 of file RegExpValidator.php.

References TYPO3\CMS\Form\Validation\RegExpValidator\setRegularExpression().

Member Function Documentation

◆ isValid()

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

Returns TRUE if submitted value validates according to rule

Returns
boolean
See also
::isValid()

Implements TYPO3\CMS\Form\Validation\ValidatorInterface.

Definition at line 54 of file RegExpValidator.php.

◆ setRegularExpression()

TYPO3\CMS\Form\Validation\RegExpValidator::setRegularExpression (   $expression)

Set the regular expression

Parameters
string$expressionThe regular expression
Returns
object Rule object

Definition at line 70 of file RegExpValidator.php.

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

Member Data Documentation

◆ $regularExpression

TYPO3\CMS\Form\Validation\RegExpValidator::$regularExpression
protected

Definition at line 36 of file RegExpValidator.php.

◆ LOCALISATION_OBJECT_NAME

const TYPO3\CMS\Form\Validation\RegExpValidator::LOCALISATION_OBJECT_NAME = 'tx_form_system_validate_regexp'

Definition at line 29 of file RegExpValidator.php.