PHP Class Bluz\Validator\Rule\Length

Inheritance: extends AbstractCompareRule
Afficher le fichier Open project: bluzphp/framework Class Usage Examples

Protected Properties

Свойство Type Description
$maxValue maximum value
$minValue minimum value

Méthodes publiques

Méthode Description
__construct ( integer | null $min = null, integer | null $max = null, boolean $inclusive = true ) Setup validation rule
getTemplate ( ) : string Get error template
validate ( string $input ) : boolean Check input data

Méthodes protégées

Méthode Description
extractLength ( string | object $input ) : integer | false Extract length

Method Details

__construct() public méthode

Setup validation rule
public __construct ( integer | null $min = null, integer | null $max = null, boolean $inclusive = true )
$min integer | null
$max integer | null
$inclusive boolean

extractLength() protected méthode

Extract length
protected extractLength ( string | object $input ) : integer | false
$input string | object
Résultat integer | false

getTemplate() public méthode

Get error template
public getTemplate ( ) : string
Résultat string

validate() public méthode

Check input data
public validate ( string $input ) : boolean
$input string
Résultat boolean

Property Details

$maxValue protected_oe property

maximum value
protected $maxValue

$minValue protected_oe property

minimum value
protected $minValue