API Documentation

Validate/StringLength.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
version
$Id: StringLength.php 22697 2010-07-26 21:14:47Z alexander $
Classes
Zend_Validate_StringLength

Description

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.

Zend_Validate_StringLength

Extends from
Zend_Validate_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
Constants
INVALID
TOO_SHORT
TOO_LONG
Properties
$_messageTemplates
$_messageVariables
$_min
$_max
$_encoding
Methods
__construct
getMin
setMin
getMax
setMax
getEncoding
setEncoding
isValid

Description

Constants

INVALID

 INVALID = 'stringLengthInvalid'

Details

value
stringLengthInvalid

TOO_SHORT

 TOO_SHORT = 'stringLengthTooShort'

Details

value
stringLengthTooShort

TOO_LONG

 TOO_LONG = 'stringLengthTooLong'

Details

value
stringLengthTooLong

Properties

$_encoding

string|null $_encoding = ''

Encoding to use

Details

$_encoding
string|null
visibility
protected
default
final
false
static
false

$_max

integer|null $_max = ''

Maximum length

If null, there is no maximum length

Details

$_max
integer|null
visibility
protected
default
final
false
static
false

$_messageTemplates

array $_messageTemplates = 'array'

Details

$_messageTemplates
array
visibility
protected
default
array
final
false
static
false

$_messageVariables

array $_messageVariables = 'array'

Details

$_messageVariables
array
visibility
protected
default
array
final
false
static
false

$_min

integer $_min = ''

Minimum length

Details

$_min
integer
visibility
protected
default
final
false
static
false

Methods

__construct

__construct( integer|array|Zend_Config $options = array ) : void

Sets validator options

Arguments
$options
integerarrayZend_Config
Details
visibility
public
final
false
static
false

getEncoding

getEncoding( ) : string

Returns the actual encoding

Output
string
Details
visibility
public
final
false
static
false

getMax

getMax( ) : integer|null

Returns the max option

Output
integer|null
Details
visibility
public
final
false
static
false

getMin

getMin( ) : integer

Returns the min option

Output
integer
Details
visibility
public
final
false
static
false

isValid

isValid( string $value ) : boolean

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

Arguments
$value
string
Output
boolean
Details
visibility
public
final
false
static
false

setEncoding

setEncoding( string $encoding = null ) : Zend_Validate_StringLength

Sets a new encoding to use

Arguments
$encoding
string
Details
visibility
public
final
false
static
false

setMax

setMax( integer|null $max ) : Zend_Validate_StringLength

Sets the max option

Arguments
$max
integernull
Output
Zend_Validate_StringLength
Provides a fluent interface
Details
visibility
public
final
false
static
false
throws

setMin

setMin( integer $min ) : Zend_Validate_StringLength

Sets the min option

Arguments
$min
integer
Output
Zend_Validate_StringLength
Provides a fluent interface
Details
visibility
public
final
false
static
false
throws
Documentation was generated by DocBlox.