Issue Bug Closed

#72047Using NumberRangeValidator with startRange/endRange does not work

Stephan Großberndt 12/03/15, 13:42 updated 10/02/18, 11:26

Description

  1. introduced a regression.

If you use

      * @validate NumberRange (startRange = 0, endRange = 2)

this will never be checked, but the default values from $this->supportedOptions of minimum/maximum will be used

    protected $supportedOptions = array(
        'minimum' => array(0, 'The minimum value to accept', 'integer'),
        'maximum' => array(PHP_INT_MAX, 'The maximum value to accept', 'integer'),
        'startRange' => array(0, 'The minimum value to accept', 'integer'),
        'endRange' => array(PHP_INT_MAX, 'The maximum value to accept', 'integer')
    );

Reviews 1