2016. Class

2016.1. Zend\Validator\StringLength

2016.1.1. Methods

2016.1.1.1. __construct

__construct()

Sets validator options

Parameters:integer|array|Traversable

2016.1.1.2. getMin

getMin()

Returns the min option

Return type:integer

2016.1.1.3. setMin

setMin()

Sets the min option

Parameters:integer
Throws ExceptionInvalidArgumentException:
 
Return type:StringLength Provides a fluent interface

2016.1.1.4. getMax

getMax()

Returns the max option

Return type:integer|null

2016.1.1.5. setMax

setMax()

Sets the max option

Parameters:integer|null
Throws ExceptionInvalidArgumentException:
 
Return type:StringLength Provides a fluent interface

2016.1.1.6. getStringWrapper

getStringWrapper()

Get the string wrapper to detect the string length

Return type:StringWrapper

2016.1.1.7. setStringWrapper

setStringWrapper()

Set the string wrapper to detect the string length

Parameters:StringWrapper
Return type:StringLength

2016.1.1.8. getEncoding

getEncoding()

Returns the actual encoding

Return type:string

2016.1.1.9. setEncoding

setEncoding()

Sets a new encoding to use

Parameters:string
Return type:StringLength
Throws :ExceptionInvalidArgumentException

2016.1.1.10. isValid

isValid()

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

Parameters:string
Return type:bool

2016.1.2. Constants

2016.1.2.1. INVALID

2016.1.2.2. TOO_SHORT

2016.1.2.3. TOO_LONG