Public Member Functions | Data Fields | Protected Attributes

Zend_Validate_Date Class Reference

Inheritance diagram for Zend_Validate_Date:
Zend_Validate_Abstract Zend_Validate_Interface

Public Member Functions

 __construct ($format=null, $locale=null)
 getLocale ()
 setLocale ($locale=null)
 getFormat ()
 setFormat ($format=null)
 isValid ($value)

Data Fields

const INVALID = 'dateInvalid'
const NOT_YYYY_MM_DD = 'dateNotYYYY-MM-DD'
const INVALID_DATE = 'dateInvalidDate'
const FALSEFORMAT = 'dateFalseFormat'

Protected Attributes

 $_messageTemplates
 $_format
 $_locale

Detailed Description

Definition at line 33 of file Date.php.


Constructor & Destructor Documentation

__construct ( format = null,
locale = null 
)

Sets validator options

Parameters:
string$formatOPTIONAL
string | Zend_Locale$localeOPTIONAL
Returns:
void

Definition at line 73 of file Date.php.


Member Function Documentation

getFormat (  )

Returns the locale option

Returns:
string|null

Definition at line 116 of file Date.php.

getLocale (  )

Returns the locale option

Returns:
string|Zend_Locale|null

Definition at line 93 of file Date.php.

isValid ( value )

Defined by Zend_Validate_Interface

Returns true if $value is a valid date of the format YYYY-MM-DD If optional $format or $locale is set the date format is checked according to Zend_Date, see Zend_Date::isDate()

Parameters:
string | array | Zend_Date$value
Returns:
boolean

Implements Zend_Validate_Interface.

Definition at line 143 of file Date.php.

setFormat ( format = null )

Sets the format option

Parameters:
string$format
Returns:
Zend_Validate_Date provides a fluent interface

Definition at line 127 of file Date.php.

setLocale ( locale = null )

Sets the locale option

Parameters:
string | Zend_Locale$locale
Returns:
Zend_Validate_Date provides a fluent interface

Definition at line 104 of file Date.php.


Field Documentation

$_messageTemplates [protected]
Initial value:
 array(
        self::INVALID        => "Invalid type given, value should be string, integer, array or Zend_Date",
        self::NOT_YYYY_MM_DD => "'%value%' is not of the format YYYY-MM-DD",
        self::INVALID_DATE   => "'%value%' does not appear to be a valid date",
        self::FALSEFORMAT    => "'%value%' does not fit given date format"
    )

Reimplemented from Zend_Validate_Abstract.

Definition at line 45 of file Date.php.


The documentation for this class was generated from the following file: