Neuron-PHP

IsStringLength extends Base
in package

Validator base class.

Table of Contents

Properties

$_maxLength  : int
$_minLength  : int

Methods

__construct()  : void
Constructor method to initialize the minimum and maximum lengths.
isValid()  : bool
Returns true if validation is successful
validate()  : bool
Abstract method to be implemented by all validators.

Properties

Methods

__construct()

Constructor method to initialize the minimum and maximum lengths.

public __construct(int $min, int $max) : void
Parameters
$min : int

The minimum length.

$max : int

The maximum length.

isValid()

Returns true if validation is successful

public isValid(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

validate()

Abstract method to be implemented by all validators.

protected validate(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

        
On this page

Search results