TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Form\Validation\ValidatorInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Form\Validation\ValidatorInterface:
tx_form_System_Validate_Interface TYPO3\CMS\Form\Validation\AbstractValidator TYPO3\CMS\Form\Validation\BetweenValidator TYPO3\CMS\Form\Validation\FileAllowedTypesValidator TYPO3\CMS\Form\Validation\FileMaximumSizeValidator TYPO3\CMS\Form\Validation\FileMinimumSizeValidator tx_form_System_Validate_Abstract TYPO3\CMS\Form\Validation\AlphabeticValidator TYPO3\CMS\Form\Validation\AlphanumericValidator TYPO3\CMS\Form\Validation\BetweenValidator TYPO3\CMS\Form\Validation\DateValidator TYPO3\CMS\Form\Validation\DigitValidator TYPO3\CMS\Form\Validation\EmailValidator TYPO3\CMS\Form\Validation\EqualsValidator TYPO3\CMS\Form\Validation\FileAllowedTypesValidator TYPO3\CMS\Form\Validation\FileMaximumSizeValidator TYPO3\CMS\Form\Validation\FileMinimumSizeValidator TYPO3\CMS\Form\Validation\FloatValidator TYPO3\CMS\Form\Validation\GreaterThanValidator TYPO3\CMS\Form\Validation\InArrayValidator TYPO3\CMS\Form\Validation\IntegerValidator TYPO3\CMS\Form\Validation\IpValidator TYPO3\CMS\Form\Validation\LengthValidator TYPO3\CMS\Form\Validation\LessthanValidator TYPO3\CMS\Form\Validation\RegExpValidator TYPO3\CMS\Form\Validation\RequiredValidator TYPO3\CMS\Form\Validation\UriValidator tx_form_System_Validate_Between tx_form_System_Validate_Fileallowedtypes tx_form_System_Validate_Filemaximumsize tx_form_System_Validate_Fileminimumsize

Public Member Functions

 setFieldName ($fieldName)
 
 getFieldName ()
 
 isValid ()
 
 getMessage ()
 
 getError ()
 
 setMessage ($message='', $type='TEXT')
 
 setShowMessage ($show)
 
 messageMustBeDisplayed ()
 

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! Interface for validate

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 ValidatorInterface.php.

Member Function Documentation

◆ getError()

TYPO3\CMS\Form\Validation\ValidatorInterface::getError ( )

Returns the error

Returns
array Typoscript for cObj

Implemented in TYPO3\CMS\Form\Validation\AbstractValidator.

◆ getFieldName()

TYPO3\CMS\Form\Validation\ValidatorInterface::getFieldName ( )

Returns the field name

Returns
string The field name

Implemented in TYPO3\CMS\Form\Validation\AbstractValidator.

◆ getMessage()

TYPO3\CMS\Form\Validation\ValidatorInterface::getMessage ( )

Returns the message

Returns
array Typoscript for cObj

Implemented in TYPO3\CMS\Form\Validation\AbstractValidator.

◆ isValid()

◆ messageMustBeDisplayed()

TYPO3\CMS\Form\Validation\ValidatorInterface::messageMustBeDisplayed ( )

Returns TRUE when message needs to be displayed

Returns
boolean

Implemented in TYPO3\CMS\Form\Validation\AbstractValidator.

◆ setFieldName()

TYPO3\CMS\Form\Validation\ValidatorInterface::setFieldName (   $fieldName)

Set the fieldName

Parameters
string$fieldNameThe field name
Returns
object The rule object

Implemented in TYPO3\CMS\Form\Validation\AbstractValidator.

◆ setMessage()

TYPO3\CMS\Form\Validation\ValidatorInterface::setMessage (   $message = '',
  $type = 'TEXT' 
)

Set the message, like 'required' for the validation rule and substitutes markers for values, like maximum

The output will be a Typoscript array to use as cObj If no parameter is given, it will take the default locallang label If only first parameter, then it's supposed to be a TEXT cObj When both are filled, it's supposed to be a cObj made by the administrator In the last case, no markers will be substituted

Parameters
mixed$messageMessage as string or TS
string$typeName of the cObj
Returns
void

Implemented in TYPO3\CMS\Form\Validation\AbstractValidator.

◆ setShowMessage()

TYPO3\CMS\Form\Validation\ValidatorInterface::setShowMessage (   $show)

Set if message needs to be displayed

Parameters
boolean$showTRUE is display
Returns
object The rule object

Implemented in TYPO3\CMS\Form\Validation\AbstractValidator.