src/Charcoal/Property/StringProperty.php
public function setMinLength($minLength)
    {
        if (!is_integer($minLength)) {
            throw new InvalidArgumentException(
                'Min length must be an integer.'
            );
        }

        if ($minLength < 0) {
            throw new InvalidArgumentException(
                'Min length must be a positive integer (>=0).'
            );
        }

        $this->minLength = $minLength;

        return $this;
    }
public function setMinLength($minLength)
    {
        if (!is_integer($minLength)) {
            throw new InvalidArgumentException(
                'Min length must be an integer.'
            );
        }

        if ($minLength < 0) {
            throw new InvalidArgumentException(
                'Min length must be a positive integer (>=0).'
            );
        }

        $this->minLength = $minLength;

        return $this;
    }
public function setMinLength ( $ minLength ) { if ( ! is_integer ( $ minLength ) ) { throw new InvalidArgumentException ( 'Min length must be an integer.' ) ; } if ( $ minLength < 0 ) { throw new InvalidArgumentException ( 'Min length must be a positive integer (>=0).' ) ; } $ this -> minLength = $ minLength ; return $ this ; }
Set the minimum number of characters allowed.

@param integer $minLength The minimum length allowed.
@throws InvalidArgumentException If the parameter is not an integer or < 0.
@return self
Set the minimum number of characters allowed .