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);
    }
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);
    }
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 ) ; }
Specifies the numeric range constraints for the value of a data field.

@param string|object $modelType The name type of model.
@param string $propertyName The property name to check.
@param int $max The maximum allowed field value.
@param int $min The minimum allowed field value.
@param string The error message.

@return void
Specifies the numeric range constraints for the value of a data field .