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

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

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

revision 1.1 by jonen, Sat Feb 22 21:07:48 2003 UTC revision 1.2 by jonen, Sat Sep 20 00:20:15 2003 UTC
# Line 55  class FEPassword extends FEText { Line 55  class FEPassword extends FEText {
55       * validation and setting the appropriate error message       * validation and setting the appropriate error message
56       * in case of a failed validation       * in case of a failed validation
57       *       *
58         * @param FormValidation object
59       */       */
60      function validate() {      function validate(&$_FormValidation) {
61          $v = new FormValidation;          if (!$_FormValidation->is_password($this->get_value())) {
62          if (!$v->is_password($this->get_value())) {              $this->set_error_message( $_FormValidation->get_error_message() );
             $this->set_error_message( $v->get_error_message() );  
63              return FALSE;              return FALSE;
64          }          }
65          return TRUE;          return TRUE;
# Line 116  class FEConfirmPassword extends FEPasswo Line 116  class FEConfirmPassword extends FEPasswo
116       * validation and setting the appropriate error message       * validation and setting the appropriate error message
117       * in case of a failed validation       * in case of a failed validation
118       *       *
119         * @param FormValidation object
120       */       */
121      function validate() {      function validate(&$_FormValidation) {
122          $v = new FormValidation;          if (!$_FormValidation->is_password($this->get_value())) {
123          if (!$v->is_password($this->get_value())) {              $this->set_error_message( $_FormValidation->get_error_message() );
             $this->set_error_message( $v->get_error_message() );  
124              return FALSE;              return FALSE;
125          }          }
126    
# Line 133  class FEConfirmPassword extends FEPasswo Line 133  class FEConfirmPassword extends FEPasswo
133          }          }
134    
135          //looks like we have an FEPassword to confirm against          //looks like we have an FEPassword to confirm against
136          if (!$v->is_confirm_password($this->get_value(),          if (!$_FormValidation->is_confirm_password($this->get_value(),
137                                      $this->_fepassword->get_value())) {                                                     $this->_fepassword->get_value())) {
138              $this->set_error_message( $v->get_error_message() );              $this->set_error_message( $_FormValidation->get_error_message() );
139              return FALSE;              return FALSE;
140          }          }
141    

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

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