Bluz\Validator\Rule\Between::__construct PHP Method

__construct() public method

Setup validation rule
public __construct ( mixed $min, mixed $max, boolean $inclusive = false )
$min mixed
$max mixed
$inclusive boolean
    public function __construct($min, $max, $inclusive = false)
    {
        $this->minValue = $min;
        $this->maxValue = $max;
        $this->inclusive = $inclusive;
        if (is_null($min) || is_null($max)) {
            throw new ComponentException('Minimum and maximum is required');
        }
        if ($min > $max) {
            throw new ComponentException(sprintf('%s cannot be less than %s for validation', $min, $max));
        }
    }