public function __construct($min = null, $max = null, $inclusive = true)
{
$this->minValue = $min;
$this->maxValue = $max;
$this->inclusive = $inclusive;
if (!is_null($min) && !is_numeric($min)) {
throw new ComponentException(__('"%s" is not a valid numeric length', $min));
}
if (!is_null($max) && !is_numeric($max)) {
throw new ComponentException(__('"%s" is not a valid numeric length', $max));
}
if (!is_null($min) && !is_null($max) && $min > $max) {
throw new ComponentException(__('"%s" cannot be less than "%s" for validation', $min, $max));
}
}