IsNumberWithinRange
extends Base
in package
Requires a number to be within a specific range.
Table of Contents
Properties
Methods
- __construct() : mixed
- getRange() : NumericRange
- isValid() : bool
- Returns true if validation is successful
- setRange() : $this
- validate() : bool
- Abstract method to be implemented by all validators.
Properties
$_range
private
NumericRange
$_range
Methods
__construct()
public
__construct(NumericRange $range) : mixed
Parameters
- $range : NumericRange
getRange()
public
getRange() : NumericRange
Return values
NumericRangeisValid()
Returns true if validation is successful
public
isValid(mixed $value) : bool
Parameters
- $value : mixed
Return values
boolsetRange()
public
setRange(NumericRange $range) : $this
Parameters
- $range : NumericRange
Return values
$thisvalidate()
Abstract method to be implemented by all validators.
protected
validate(mixed $value) : bool
Parameters
- $value : mixed