TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
RequiredValidator Class Reference
Inheritance diagram for RequiredValidator:
AbstractValidator AbstractValidator ValidatorInterface

Public Member Functions

 isValid ($value)
 
- Public Member Functions inherited from AbstractValidator
 setRawArgument ($rawArgument)
 
 setFormUtility (FormUtility $formUtility)
 
 substituteMarkers ($message)
 
 getLocalLanguageLabel ($type= '')
 
 renderMessage ($message=null, $type=null, $messageType= 'message')
 
- Public Member Functions inherited from AbstractValidator
 __construct (array $options=array())
 
 validate ($value)
 
 getOptions ()
 

Public Attributes

const LOCALISATION_OBJECT_NAME = 'tx_form_system_validate_required'
 
- Public Attributes inherited from AbstractValidator
const LOCALISATION_OBJECT_NAME = 'tx_form_system_validate'
 

Protected Member Functions

 setAllFieldsAreEmpty ($allFieldsAreEmpty=true)
 
 getAllFieldsAreEmpty ()
 

Protected Attributes

 $allFieldsAreEmpty = true
 
- Protected Attributes inherited from AbstractValidator
 $formUtility
 
 $rawArgument
 
 $supportedOptions
 
 $acceptsEmptyValues = false
 
- Protected Attributes inherited from AbstractValidator
 $acceptsEmptyValues = true
 
 $supportedOptions = array()
 
 $options = array()
 
 $result
 

Detailed Description

Definition at line 17 of file RequiredValidator.php.

Member Function Documentation

getAllFieldsAreEmpty ( )
protected

A helper method for the array_walk_recursive callback in the function isValid(). If the callback detect a empty value, the property allFieldsAreEmpty is set to TRUE.

Returns
bool

Definition at line 98 of file RequiredValidator.php.

References RequiredValidator\$allFieldsAreEmpty.

Referenced by RequiredValidator\isValid().

isValid (   $value)

Check if $value is valid. If it is not valid, needs to add an error to result.

Parameters
mixed$value
Returns
void

Definition at line 38 of file RequiredValidator.php.

References AbstractValidator\addError(), RequiredValidator\getAllFieldsAreEmpty(), and AbstractValidator\renderMessage().

setAllFieldsAreEmpty (   $allFieldsAreEmpty = true)
protected

A helper method for the array_walk_recursive callback in the function isValid(). If the callback detect a empty value, the property allFieldsAreEmpty is set to TRUE.

Parameters
bool$allFieldsAreEmpty
Returns
void

Definition at line 85 of file RequiredValidator.php.

References RequiredValidator\$allFieldsAreEmpty.

Member Data Documentation

$allFieldsAreEmpty = true
protected
const LOCALISATION_OBJECT_NAME = 'tx_form_system_validate_required'

Definition at line 24 of file RequiredValidator.php.