Public Member Functions | |
addValidator (Zend_Validate_Interface $validator, $breakChainOnFailure=false) | |
isValid ($value) | |
getMessages () | |
getErrors () | |
Static Public Member Functions | |
static | getDefaultNamespaces () |
static | setDefaultNamespaces ($namespace) |
static | addDefaultNamespaces ($namespace) |
static | hasDefaultNamespaces () |
static | is ($value, $classBaseName, array $args=array(), $namespaces=array()) |
static | getMessageLength () |
static | setMessageLength ($length=-1) |
Protected Attributes | |
$_validators = array() | |
$_messages = array() | |
$_errors = array() | |
Static Protected Attributes | |
static | $_defaultNamespaces = array() |
Definition at line 33 of file Validate.php.
static addDefaultNamespaces | ( | $ | namespace ) | [static] |
Adds a new default namespace
array | string | $namespace |
Definition at line 168 of file Validate.php.
addValidator | ( | Zend_Validate_Interface $ | validator, |
$ | breakChainOnFailure = false |
||
) |
Adds a validator to the end of the chain
If $breakChainOnFailure is true, then if the validator fails, the next validator in the chain, if one exists, will not be executed.
Zend_Validate_Interface | $validator | |
boolean | $breakChainOnFailure |
Definition at line 74 of file Validate.php.
static getDefaultNamespaces | ( | ) | [static] |
getErrors | ( | ) |
Defined by Zend_Validate_Interface
Returns array of validation failure message codes
Implements Zend_Validate_Interface.
Definition at line 132 of file Validate.php.
static getMessageLength | ( | ) | [static] |
Returns the maximum allowed message length
Definition at line 230 of file Validate.php.
getMessages | ( | ) |
Defined by Zend_Validate_Interface
Returns array of validation failure messages
Implements Zend_Validate_Interface.
Definition at line 119 of file Validate.php.
static hasDefaultNamespaces | ( | ) | [static] |
Returns true when defaultNamespaces are set
Definition at line 182 of file Validate.php.
static is | ( | $ | value, |
$ | classBaseName, | ||
array $ | args = array() , |
||
$ | namespaces = array() |
||
) | [static] |
mixed | $value | |
string | $classBaseName | |
array | $args | OPTIONAL |
mixed | $namespaces | OPTIONAL |
Zend_Validate_Exception |
Definition at line 195 of file Validate.php.
isValid | ( | $ | value ) |
Returns true if and only if $value passes all validations in the chain
Validators are run in the order in which they were added to the chain (FIFO).
mixed | $value |
Implements Zend_Validate_Interface.
Definition at line 91 of file Validate.php.
static setDefaultNamespaces | ( | $ | namespace ) | [static] |
Sets new default namespaces
array | string | $namespace |
Definition at line 153 of file Validate.php.
static setMessageLength | ( | $ | length = -1 ) |
[static] |
Sets the maximum allowed message length
integer | $length |
Definition at line 241 of file Validate.php.