Nette\Forms\Controls\TextBase::setMaxLength PHP Method

setMaxLength() public method

Sets the maximum number of allowed characters.
public setMaxLength ( $length ) : self
return self
    public function setMaxLength($length)
    {
        $this->control->maxlength = $length;
        return $this;
    }