Swat/SwatTextarea.php
public function process()
    {
        parent::process();

        $data = &$this->getForm()->getFormData();

        if (!isset($data[$this->id])) {
            return;
        }

        $this->value = $data[$this->id];
        $length = $this->getValueLength();

        if ($length === 0) {
            $this->value = null;
        }

        if ($this->required && $length === 0) {
            $message = $this->getValidationMessage('required');
            $this->addMessage($message);
        } elseif ($this->maxlength !== null && $length > $this->maxlength) {
            $message = $this->getValidationMessage('too-long');
            $message->primary_content = sprintf(
                $message->primary_content,
                $this->maxlength
            );

            $this->addMessage($message);
        }
    }
public function process()
    {
        parent::process();

        $data = &$this->getForm()->getFormData();

        if (!isset($data[$this->id])) {
            return;
        }

        $this->value = $data[$this->id];
        $length = $this->getValueLength();

        if ($length === 0) {
            $this->value = null;
        }

        if ($this->required && $length === 0) {
            $message = $this->getValidationMessage('required');
            $this->addMessage($message);
        } elseif ($this->maxlength !== null && $length > $this->maxlength) {
            $message = $this->getValidationMessage('too-long');
            $message->primary_content = sprintf(
                $message->primary_content,
                $this->maxlength
            );

            $this->addMessage($message);
        }
    }
public function process ( ) { parent :: process ( ) ; $ data = & $ this -> getForm ( ) -> getFormData ( ) ; if ( ! isset ( $ data [ $ this -> id ] ) ) { return ; } $ this -> value = $ data [ $ this -> id ] ; $ length = $ this -> getValueLength ( ) ; if ( $ length === 0 ) { $ this -> value = null ; } if ( $ this -> required && $ length === 0 ) { $ message = $ this -> getValidationMessage ( 'required' ) ; $ this -> addMessage ( $ message ) ; } elseif ( $ this -> maxlength !== null && $ length > $ this -> maxlength ) { $ message = $ this -> getValidationMessage ( 'too-long' ) ; $ message -> primary_content = sprintf ( $ message -> primary_content , $ this -> maxlength ) ; $ this -> addMessage ( $ message ) ; } }
Processes this textarea

If a validation error occurs, an error message is attached to this
widget.
Processes this textarea