public static function range($value, $minValue, $maxValue, $message = null, $propertyPath = null)
{
static::numeric($value, $message, $propertyPath);
if ($value < $minValue || $value > $maxValue) {
$message = sprintf($message ?: 'Number "%s" was expected to be at least "%d" and at most "%d".', static::stringify($value), static::stringify($minValue), static::stringify($maxValue));
throw static::createException($value, $message, static::INVALID_RANGE, $propertyPath, array('min' => $minValue, 'max' => $maxValue));
}
return true;
}