public static function range($modelType, $propertyName, $min, $max, $errorMessage = null) {
        if (!self::canAnnotate($modelType)) {
            return;
        }

        if (empty($propertyName)) {
            throw new \Exception('$propertyName must not be empty.');
        }

        if ((int)$min > (int)$max) {
            throw new \Exception('The minimum value must not be greater than the maximum value.');
        }

        self::makeDataAnnotation($propertyName);

        self::$annotations[$propertyName]->range = array($min, $max, $errorMessage);
    }