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));
}
}