public function setMinChoices($minChoices)
    {
        if (is_int($minChoices) === true && ($minChoices > 0 || $minChoices === -1)) {

            if ($minChoices > count($this->getSimpleChoices())) {
                $msg = "The value of 'minChoices' cannot exceed the number of available choices.";
                throw new InvalidArgumentException($msg);
            }

            $this->minChoices = $minChoices;
        } else {
            $msg = "The 'minChoices' argument must be a strictly positive (> 0) integer or -1, '" . gettype($minChoices) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setMinChoices($minChoices)
    {
        if (is_int($minChoices) === true && ($minChoices > 0 || $minChoices === -1)) {

            if ($minChoices > count($this->getSimpleChoices())) {
                $msg = "The value of 'minChoices' cannot exceed the number of available choices.";
                throw new InvalidArgumentException($msg);
            }

            $this->minChoices = $minChoices;
        } else {
            $msg = "The 'minChoices' argument must be a strictly positive (> 0) integer or -1, '" . gettype($minChoices) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setMinChoices ( $ minChoices ) { if ( is_int ( $ minChoices ) === true && ( $ minChoices > 0 || $ minChoices === - 1 ) ) { if ( $ minChoices > count ( $ this -> getSimpleChoices ( ) ) ) { $ msg = "The value of 'minChoices' cannot exceed the number of available choices." ; throw new InvalidArgumentException ( $ msg ) ; } $ this -> minChoices = $ minChoices ; } else { $ msg = "The 'minChoices' argument must be a strictly positive (> 0) integer or -1, '" . gettype ( $ minChoices ) . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the minimum number of choices that the candidate may select.

@param integer $minChoices A strictly (> 0) positive integer or -1 if no value is specified for the attribute.
@throws \InvalidArgumentException If $minChoices is not a strictly positive integer nor -1.
Set the minimum number of choices that the candidate may select .