Sets maxlength attribute

@param integer $maxlength

@throws InvalidArgumentException

@return \Core\Html\Form\Textarea
486723
public function setMaxlength($maxlength)
    {
        if (empty((int) $maxlength)) {
            Throw new HtmlException('A html form textareas maxlength attribute needs to be of type integer.');
        }

        $this->attribute['maxlength'] = $maxlength;

        return $this;
    }
746043
public void setMaxExcerptLength(String maxExcerptLength) {

        try {
            setMaxExcerptLength(Integer.parseInt(maxExcerptLength));
        } catch (Exception e) {
            LOG.error(
                Messages.get().getBundle().key(
                    Messages.LOG_PARSE_EXCERPT_LENGTH_FAILED_2,
                    maxExcerptLength,
                    new Integer(DEFAULT_EXCERPT_LENGTH)),
                e);
            setMaxExcerptLength(DEFAULT_EXCERPT_LENGTH);
        }
    }
1278009
public static function shorten($text, $maxlength = 140, $end = '[...]') {
        $maxlength++;
        if (mb_strlen($text) > $maxlength) {
            $subex = mb_substr($text, 0, $maxlength - 5);
            $exwords = explode(' ', $subex);
            $excut = - (mb_strlen($exwords[count($exwords)-1]));
            if ($excut < 0) {
                $text = mb_substr($subex, 0, $excut);
            } else {
                $text = $subex;
            }
            $text .= $end;
        }
        return $text;
    }
1210909
public function hasMinLength($minLength)
    {
        $this->isString();

        $this->doCheck(function ($value) use ($minLength) {
            $this->throwExceptionIfFalse(
                mb_strlen($value) >= $minLength,
                'Failed assertion that %s has at least %s characters', $value, $minLength
            );
        });

        return $this;
    }
1173580
public function setMaxWidth($maxWidth)
    {
        $maxWidth = (int) $maxWidth;
        $this->maxWidth = $maxWidth > 0 ? $maxWidth : null;
    }
227121
public function validateMaxLength($length)
    {
        $this->validator_attributes[] = 'data-parsley-maxlength="' . (int)$length . '"';

        $this->validator_checks['max_length'] = (int)$length;

        return $this;
    }
169036
public function setFormLength($labelLength, $gapLength, $offsetLength = null)
    {
        $command = new Command\Stored\SetFormLengthCommand($labelLength, $gapLength, $offsetLength);
        $this->getComposite()->addCommand($command);
        return $this;
    }
1212165
public function wrapWords( $maxLineLength = 76 )
	{
		$this->content	= chunk_split( $this->content, $maxLineLength, Net_Mail::$delimiter );
	}
1137137
public function setMaxLineLength($lineLength)
    {
        $this->clearCachedValueIf($this->lineLength != $lineLength);
        $this->lineLength = $lineLength;
    }
344143
public function setIndentWidth($indentWidth)
    {
        if (!is_null($indentWidth) &&
            (!is_int($indentWidth) || $indentWidth < 1)
        ) {
            throw new \InvalidArgumentException(
                'indentWidth needs to be null or an integer above 0'
            );
        }

        $this->indentWidth = $indentWidth;

        return $this;
    }
39518
public function setContent($content)
    {
        if(strlen($content) > 9900)
        {
            throw new \InvalidArgumentException('Maximum content length is 9900 characters');
        }

        $this->content = $content;

        $this->setHash(sha1($content));

        return $this;
    }
1354874
protected function replaceFieldMaxLengthName(&$stub, $maxLength)
    {
        $stub = $this->strReplace('max_length', $this->getFieldMaxLengthName($maxLength), $stub);

        return $this;
    }
165183
private function maxLength()
	{
		$max = mb_strlen($this->value);
		if (!$ret = $max <= $this->options->max) {
			$this->error(1);
		}

		return $ret;
	}
743170
public function setLineLength($lineLength)
    {
        $this->lineLength = null === $lineLength ? null : (int)$lineLength;
        return $this;
    }
892715
public function setLength($length)
    {
        $this->length = $length;
        if ($this->length !== null && $this->length < 0) {
            throw new BuildException('Cannot truncate to length ' . $this->length);
        }
    }
116969
func (s *StringAttributeConstraintsType) SetMaxLength(v string) *StringAttributeConstraintsType {
	s.MaxLength = &v
	return s
}
1221946
public function setMinLength(string $elementName, int $minLength, string $errorMessage = null): \IvoPetkov\BearFrameworkAddons\Form\Constraints
    {
        if ($errorMessage === null) {
            $errorMessage = sprintf(__('ivopetkov.form.The length of this field must be atleast %s characters.'), $minLength);
        }
        $this->data[] = ['minLength', $errorMessage, $elementName, $minLength];
        return $this;
    }