protected function isValid($value)
    {
        if (!is_numeric($value)) {
            $this->addError('A valid number is expected.', 1221563685);
            return;
        }

        $minimum = $this->options['minimum'];
        $maximum = $this->options['maximum'];
        if ($minimum > $maximum) {
            $x = $minimum;
            $minimum = $maximum;
            $maximum = $x;
        }
        if ($value < $minimum || $value > $maximum) {
            $this->addError('Please enter a valid number between %1$d and %2$d.', 1221561046, [$minimum, $maximum]);
        }
    }
protected function isValid($value)
    {
        if (!is_numeric($value)) {
            $this->addError('A valid number is expected.', 1221563685);
            return;
        }

        $minimum = $this->options['minimum'];
        $maximum = $this->options['maximum'];
        if ($minimum > $maximum) {
            $x = $minimum;
            $minimum = $maximum;
            $maximum = $x;
        }
        if ($value < $minimum || $value > $maximum) {
            $this->addError('Please enter a valid number between %1$d and %2$d.', 1221561046, [$minimum, $maximum]);
        }
    }
protected function isValid ( $ value ) { if ( ! is_numeric ( $ value ) ) { $ this -> addError ( 'A valid number is expected.' , 1221563685 ) ; return ; } $ minimum = $ this -> options [ 'minimum' ] ; $ maximum = $ this -> options [ 'maximum' ] ; if ( $ minimum > $ maximum ) { $ x = $ minimum ; $ minimum = $ maximum ; $ maximum = $ x ; } if ( $ value < $ minimum || $ value > $ maximum ) { $ this -> addError ( 'Please enter a valid number between %1$d and %2$d.' , 1221561046 , [ $ minimum , $ maximum ] ) ; } }
The given value is valid if it is a number in the specified range.

@param mixed $value The value that should be validated
@return void
@api
The given value is valid if it is a number in the specified range .