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

Public Member Functions

 isValid ($value)
 
 substituteMarkers ($message)
 
- 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_date'
 
- Public Attributes inherited from AbstractValidator
const LOCALISATION_OBJECT_NAME = 'tx_form_system_validate'
 

Protected Member Functions

 humanReadableDateFormat ($format)
 

Protected Attributes

 $supportedOptions
 
- 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 DateValidator.php.

Member Function Documentation

humanReadableDateFormat (   $format)
protected

Converts strftime date format to human readable format according to local language.

Example for default language: e-m-Y becomes d-mm-yyyy

Parameters
string$formatstrftime format
Returns
string Human readable format

Definition at line 133 of file DateValidator.php.

Referenced by DateValidator\substituteMarkers().

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 42 of file DateValidator.php.

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

substituteMarkers (   $message)

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 117 of file DateValidator.php.

References DateValidator\humanReadableDateFormat().

Member Data Documentation

$supportedOptions
protected
Initial value:
= array(
'element' => array('', 'The name of the element', 'string', true),
'errorMessage' => array('', 'The error message', 'array', true),
'format' => array('', 'The maximum value', 'string', true),
)

Definition at line 22 of file DateValidator.php.

const LOCALISATION_OBJECT_NAME = 'tx_form_system_validate_date'

Definition at line 33 of file DateValidator.php.