Class Zend_Validate_StringLength

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

Located in /Validate/StringLength.php (line 36)

Zend_Validate_Abstract
   |
   --Zend_Validate_StringLength
Class Constant Summary
 TOO_LONG = 'stringLengthTooLong'
 TOO_SHORT = 'stringLengthTooShort'
Variable Summary
 integer|null $_max
 integer $_min
Method Summary
 void __construct ([integer $min = 0], [integer $max = null])
 integer|null getMax ()
 integer getMin ()
 boolean isValid (string $value)
 Zend_Validate_StringLength setMax (integer|null $max)
Variables
integer|null $_max (line 72)

Maximum length

If null, there is no maximum length

  • access: protected
array $_messageTemplates = array(
self::TOO_SHORT => "'%value%' is less than %min% characters long",
self::TOO_LONG => "'%value%' is greater than %max% characters long"
)
(line 45)
  • access: protected

Redefinition of:
Zend_Validate_Abstract::$_messageTemplates
array $_messageVariables = array(
'min' => '_min',
'max' => '_max'
)
(line 53)
  • access: protected

Redefinition of:
Zend_Validate_Abstract::$_messageVariables
integer $_min (line 63)

Minimum length

  • access: protected

Inherited Variables

Inherited from Zend_Validate_Abstract

Zend_Validate_Abstract::$_errors
Zend_Validate_Abstract::$_messages
Zend_Validate_Abstract::$_value
Methods
Constructor __construct (line 81)

Sets validator options

  • access: public
void __construct ([integer $min = 0], [integer $max = null])
  • integer $min
  • integer $max
getMax (line 114)

Returns the max option

  • access: public
integer|null getMax ()
getMin (line 92)

Returns the min option

  • access: public
integer getMin ()
isValid (line 145)

Defined by Zend_Validate_Interface

Returns true if and only if the string length of $value is at least the min option and no greater than the max option (when the max option is not null).

  • access: public
boolean isValid (string $value)
  • string $value
setMax (line 125)

Sets the max option

  • return: Provides a fluent interface
  • access: public
Zend_Validate_StringLength setMax (integer|null $max)
  • integer|null $max
setMin (line 103)

Sets the min option

  • return: Provides a fluent interface
  • access: public
Zend_Validate_StringLength setMin (integer $min)
  • integer $min

Inherited Methods

Inherited From Zend_Validate_Abstract

 Zend_Validate_Abstract::getErrors()
 Zend_Validate_Abstract::getMessages()
 Zend_Validate_Abstract::setMessage()
 Zend_Validate_Abstract::setMessages()
 Zend_Validate_Abstract::_createMessage()
 Zend_Validate_Abstract::_error()
 Zend_Validate_Abstract::_setValue()
 Zend_Validate_Abstract::__get()
Class Constants
TOO_LONG = 'stringLengthTooLong' (line 40)
TOO_SHORT = 'stringLengthTooShort' (line 39)

Documentation generated on Sun, 27 May 2007 23:27:57 -0700 by phpDocumentor 1.3.2