Validate.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Validate
- Version
- $Id$
Package: Zend_Validate- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties



array $_errors = array()Array of validation failure message codes
Default valuearray()Details- Type
- array
- Deprecated
- Since 1.5.0



array $_messages = array()Array of validation failure messages
Default valuearray()Details- Type
- array
Methods



addDefaultNamespaces(array | string $namespace) : nullstaticAdds a new default namespace
Parameters| Name | Type | Description |
|---|
| $namespace | array | string | |
|---|
Returns 


addValidator(\Zend_Validate_Interface $validator, boolean $breakChainOnFailure = false) : \Zend_ValidateAdds 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.
ParametersReturns


getDefaultTranslator( $translator = null) : \Zend_Translate_Adapter | nullstaticReturns the default translation object
Parameters| Name | Type | Description |
|---|
| $translator | | |
|---|
Returns 


getErrors() : arrayDefined by Zend_Validate_Interface
Returns array of validation failure message codes
ReturnsDetails- Deprecated
- Since 1.5.0



getMessages() : arrayDefined by Zend_Validate_Interface
Returns array of validation failure messages
Returns


is(mixed $value, string $classBaseName, array $args = array(), mixed $namespaces = array()) : booleanParameters| Name | Type | Description |
|---|
| $value | mixed | |
|---|
| $classBaseName | string | |
|---|
| $args | array | OPTIONAL |
|---|
| $namespaces | mixed | OPTIONAL |
|---|
ReturnsThrows 


isValid(mixed $value) : booleanReturns 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).
Parameters| Name | Type | Description |
|---|
| $value | mixed | |
|---|
Returns


setDefaultNamespaces(array | string $namespace) : nullstaticSets new default namespaces
Parameters| Name | Type | Description |
|---|
| $namespace | array | string | |
|---|
Returns 


setMessageLength(integer $length = -1) : voidstaticSets the maximum allowed message length
Parameters| Name | Type | Description |
|---|
| $length | integer | |
|---|