Class Zend_Validate_StringLength

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

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

Zend_Validate_Abstract
   |
   --Zend_Validate_StringLength
Class Constant Summary
 INVALID = 'stringLengthInvalid'
 TOO_LONG = 'stringLengthTooLong'
 TOO_SHORT = 'stringLengthTooShort'
Variable Summary
 string|null $_encoding
 integer|null $_max
 integer $_min
Method Summary
 void __construct ([integer|array|Zend_Config $options = array()])
 string getEncoding ()
 integer|null getMax ()
 integer getMin ()
 boolean isValid (string $value)
 Zend_Validate_StringLength setEncoding ([string $encoding = null])
 Zend_Validate_StringLength setMax (integer|null $max)
Variables
string|null $_encoding (line 77)

Encoding to use

  • access: protected
integer|null $_max (line 70)

Maximum length

If null, there is no maximum length

  • access: protected
array $_messageTemplates = array(
self::INVALID => "Invalid type given, value should be a string",
self::TOO_SHORT => "'%value%' is less than %min% characters long",
self::TOO_LONG => "'%value%' is more than %max% characters long",
)
(line 42)
  • access: protected

Redefinition of:
Zend_Validate_Abstract::$_messageTemplates
Validation failure message template definitions
array $_messageVariables = array(
'min' => '_min',
'max' => '_max'
)
(line 51)
  • access: protected

Redefinition of:
Zend_Validate_Abstract::$_messageVariables
Additional variables available for validation failure messages
integer $_min (line 61)

Minimum length

  • access: protected

Inherited Variables

Inherited from Zend_Validate_Abstract

Zend_Validate_Abstract::$_defaultTranslator
Zend_Validate_Abstract::$_errors
Zend_Validate_Abstract::$_messageLength
Zend_Validate_Abstract::$_messages
Zend_Validate_Abstract::$_obscureValue
Zend_Validate_Abstract::$_translator
Zend_Validate_Abstract::$_translatorDisabled
Zend_Validate_Abstract::$_value
Methods
Constructor __construct (line 85)

Sets validator options

  • access: public
void __construct ([integer|array|Zend_Config $options = array()])
getEncoding (line 188)

Returns the actual encoding

  • access: public
string getEncoding ()
getMax (line 153)

Returns the max option

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

Returns the min option

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

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
setEncoding (line 199)

Sets a new encoding to use

  • access: public
Zend_Validate_StringLength setEncoding ([string $encoding = null])
  • string $encoding
setMax (line 165)

Sets the max option

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

Sets the min option

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

Inherited Methods

Inherited From Zend_Validate_Abstract

 Zend_Validate_Abstract::getDefaultTranslator()
 Zend_Validate_Abstract::getErrors()
 Zend_Validate_Abstract::getMessageLength()
 Zend_Validate_Abstract::getMessages()
 Zend_Validate_Abstract::getMessageTemplates()
 Zend_Validate_Abstract::getMessageVariables()
 Zend_Validate_Abstract::getObscureValue()
 Zend_Validate_Abstract::getTranslator()
 Zend_Validate_Abstract::hasDefaultTranslator()
 Zend_Validate_Abstract::hasTranslator()
 Zend_Validate_Abstract::setDefaultTranslator()
 Zend_Validate_Abstract::setDisableTranslator()
 Zend_Validate_Abstract::setMessage()
 Zend_Validate_Abstract::setMessageLength()
 Zend_Validate_Abstract::setMessages()
 Zend_Validate_Abstract::setObscureValue()
 Zend_Validate_Abstract::setTranslator()
 Zend_Validate_Abstract::translatorIsDisabled()
 Zend_Validate_Abstract::_createMessage()
 Zend_Validate_Abstract::_error()
 Zend_Validate_Abstract::_setValue()
 Zend_Validate_Abstract::__get()
Class Constants
INVALID = 'stringLengthInvalid' (line 35)
TOO_LONG = 'stringLengthTooLong' (line 37)
TOO_SHORT = 'stringLengthTooShort' (line 36)

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