PHP Class Jyxo\Input\Validator\StringLengthLessThan

Author: Jan Pěček
Inheritance: extends AbstractValidator
Mostra file Open project: jyxo/php

Protected Properties

Property Type Description
$max integer Maximal string length.

Public Methods

Method Description
__construct ( integer $max ) Constructor.
getMax ( ) : integer Returns the maximal string length.
isValid ( mixed $value ) : boolean Validates a value.
setMax ( integer $max ) : self Sets the maximal string length.

Method Details

__construct() public method

Constructor.
public __construct ( integer $max )
$max integer Maximal string length (value length must be lower)

getMax() public method

Returns the maximal string length.
public getMax ( ) : integer
return integer

isValid() public method

Validates a value.
public isValid ( mixed $value ) : boolean
$value mixed Input value
return boolean

setMax() public method

Sets the maximal string length.
public setMax ( integer $max ) : self
$max integer Maximal string length
return self

Property Details

$max protected_oe property

Maximal string length.
protected int $max
return integer