/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/form/form_elements/FETextArea.inc
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/form/form_elements/FETextArea.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jonen, Sat Sep 20 00:20:15 2003 UTC revision 1.3 by jonen, Thu May 6 16:27:27 2004 UTC
# Line 74  class FETextArea extends FEBoxElement { Line 74  class FETextArea extends FEBoxElement {
74    
75    
76      /**      /**
77       * This function will return the       * This method validates the data
78       * elements value       * for this Form Element.
79       *       *
80       * @return mixed       * It validates as is_name().
81         * @param FormValidation object.
82       */       */
83      function get_value() {      function validate(&$_FormValidation) {
84          if ($this->_limit_char_count < 0) {          if ($this->_limit_char_count > 0) {
85              return $this->_value;              $length = strlen($this->get_value());
86          } else {              if ($length > $this->_limit_char_count) {
87              return substr($this->_value, 0, $this->_limit_char_count);                  $_FormValidation->_error("INVALID_LENGTH_N");
88                    $this->set_error_message( str_replace(array("XX_MAX", "XX_LENGTH"),
89                                                          array($this->_limit_char_count, $length),
90                                                          $_FormValidation->get_error_message() ));
91                    return FALSE;
92                }
93          }          }
94                    return TRUE;
95      }      }
96    
97    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed