Class Zend_Validate

Description

Implements interfaces:

  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Validate.php (line 33)


	
			
Variable Summary
 static array $_defaultNamespaces
 array $_errors
 array $_messages
 array $_validators
Method Summary
 static null addDefaultNamespaces (array|string $namespace)
 static array getDefaultNamespaces ()
 static Zend_Translate_Adapter|null getDefaultTranslator ([ $translator = null])
 static integer getMessageLength ()
 static boolean hasDefaultNamespaces ()
 static boolean is (mixed $value, string $classBaseName, [ $args = array()], [mixed $namespaces = array()])
 static null setDefaultNamespaces (array|string $namespace)
 static void setDefaultTranslator ([Zend_Translate|Zend_Translate_Adapter|null $translator = null])
 static void setMessageLength ([integer $length = -1])
 Zend_Validate addValidator (Zend_Validate_Interface $validator, [boolean $breakChainOnFailure = false])
 array getErrors ()
 array getMessages ()
 boolean isValid (mixed $value)
Variables
static array $_defaultNamespaces = array() (line 54)

Default Namespaces

  • access: protected
array $_errors = array() (line 62)

Array of validation failure message codes

  • deprecated: Since 1.5.0
  • access: protected
array $_messages = array() (line 47)

Array of validation failure messages

  • access: protected
array $_validators = array() (line 40)

Validator chain

  • access: protected
Methods
static addDefaultNamespaces (line 168)

Adds a new default namespace

  • access: public
static null addDefaultNamespaces (array|string $namespace)
  • array|string $namespace
static getDefaultNamespaces (line 142)

Returns the set default namespaces

  • access: public
static array getDefaultNamespaces ()
static getDefaultTranslator (line 274)

Returns the default translation object

  • access: public
static Zend_Translate_Adapter|null getDefaultTranslator ([ $translator = null])
  • $translator
static getMessageLength (line 252)

Returns the maximum allowed message length

  • access: public
static integer getMessageLength ()
static hasDefaultNamespaces (line 182)

Returns true when defaultNamespaces are set

  • access: public
static boolean hasDefaultNamespaces ()
static is (line 195)
  • throws: Zend_Validate_Exception
  • access: public
static boolean is (mixed $value, string $classBaseName, [ $args = array()], [mixed $namespaces = array()])
  • mixed $value
  • string $classBaseName
  • array $args: OPTIONAL
  • mixed $namespaces: OPTIONAL
static setDefaultNamespaces (line 153)

Sets new default namespaces

  • access: public
static null setDefaultNamespaces (array|string $namespace)
  • array|string $namespace
static setDefaultTranslator (line 285)

Sets a default translation object for all validation objects

  • access: public
static void setDefaultTranslator ([Zend_Translate|Zend_Translate_Adapter|null $translator = null])
static setMessageLength (line 263)

Sets the maximum allowed message length

  • access: public
static void setMessageLength ([integer $length = -1])
  • integer $length
addValidator (line 74)

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.

  • return: Provides a fluent interface
  • access: public
Zend_Validate addValidator (Zend_Validate_Interface $validator, [boolean $breakChainOnFailure = false])
getErrors (line 132)

Defined by Zend_Validate_Interface

Returns array of validation failure message codes

  • deprecated: Since 1.5.0
  • access: public
array getErrors ()
getMessages (line 119)

Defined by Zend_Validate_Interface

Returns array of validation failure messages

  • access: public
array getMessages ()

Implementation of:
Zend_Validate_Interface::getMessages()
Returns an array of messages that explain why the most recent isValid() call returned false. The array keys are validation failure message identifiers, and the array values are the corresponding human-readable message strings.
isValid (line 91)

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).

  • access: public
boolean isValid (mixed $value)
  • mixed $value

Implementation of:
Zend_Validate_Interface::isValid()
Returns true if and only if $value meets the validation requirements

Documentation generated on Mon, 21 Jun 2010 15:51:21 -0400 by phpDocumentor 1.4.3