4 |
* |
* |
5 |
* $Id$ |
* $Id$ |
6 |
* |
* |
7 |
* @author Walter A. Boring IV <waboring@buildabetterweb.com> |
* @author Walter A. Boring IV <waboring@newsblob.com> |
8 |
* @author Suren Markosyan <suren@bcsweb.com> |
* @author Suren Markosyan <suren@bcsweb.com> |
9 |
* @package phpHtmlLib |
* @package phpHtmlLib |
10 |
* @subpackage FormProcessing |
* @subpackage FormProcessing |
23 |
* user's input is what they wanted. |
* user's input is what they wanted. |
24 |
* |
* |
25 |
* |
* |
26 |
* @author Walter A. Boring IV <waboring@buildabetterweb.com> |
* @author Walter A. Boring IV <waboring@newsblob.com> |
27 |
* @author Suren Markossian <suren@bcsweb.com> |
* @author Suren Markossian <suren@bcsweb.com> |
28 |
* @package phpHtmlLib |
* @package phpHtmlLib |
29 |
* @subpackage FormProcessing |
* @subpackage FormProcessing |
47 |
|
|
48 |
|
|
49 |
/** |
/** |
50 |
|
* return a string to the user for the |
51 |
|
* confirmation page |
52 |
|
* |
53 |
|
* @return string |
54 |
|
*/ |
55 |
|
function get_value_text() { |
56 |
|
return str_repeat('*', strlen($this->get_value())); |
57 |
|
} |
58 |
|
|
59 |
|
|
60 |
|
/** |
61 |
* This function performs the actual validation |
* This function performs the actual validation |
62 |
* It is called only if the validation is required by |
* It is called only if the validation is required by |
63 |
* this element |
* this element |
66 |
* validation and setting the appropriate error message |
* validation and setting the appropriate error message |
67 |
* in case of a failed validation |
* in case of a failed validation |
68 |
* |
* |
69 |
|
* @param FormValidation object |
70 |
*/ |
*/ |
71 |
function validate() { |
function validate(&$_FormValidation) { |
72 |
$v = new FormValidation; |
if (!$_FormValidation->is_password($this->get_value())) { |
73 |
if (!$v->is_password($this->get_value())) { |
$this->set_error_message( $_FormValidation->get_error_message() ); |
|
$this->set_error_message( $v->get_error_message() ); |
|
74 |
return FALSE; |
return FALSE; |
75 |
} |
} |
76 |
return TRUE; |
return TRUE; |
91 |
* object, so it can validate against. |
* object, so it can validate against. |
92 |
* |
* |
93 |
* |
* |
94 |
* @author Walter A. Boring IV <waboring@buildabetterweb.com> |
* @author Walter A. Boring IV <waboring@newsblob.com> |
95 |
* @author Suren Markossian <suren@bcsweb.com> |
* @author Suren Markossian <suren@bcsweb.com> |
96 |
* @package phpHtmlLib |
* @package phpHtmlLib |
97 |
* @subpackage FormProcessing |
* @subpackage FormProcessing |
127 |
* validation and setting the appropriate error message |
* validation and setting the appropriate error message |
128 |
* in case of a failed validation |
* in case of a failed validation |
129 |
* |
* |
130 |
|
* @param FormValidation object |
131 |
*/ |
*/ |
132 |
function validate() { |
function validate(&$_FormValidation) { |
133 |
$v = new FormValidation; |
if (!$_FormValidation->is_password($this->get_value())) { |
134 |
if (!$v->is_password($this->get_value())) { |
$this->set_error_message( $_FormValidation->get_error_message() ); |
|
$this->set_error_message( $v->get_error_message() ); |
|
135 |
return FALSE; |
return FALSE; |
136 |
} |
} |
137 |
|
|
144 |
} |
} |
145 |
|
|
146 |
//looks like we have an FEPassword to confirm against |
//looks like we have an FEPassword to confirm against |
147 |
if (!$v->is_confirm_password($this->get_value(), |
if (!$_FormValidation->is_confirm_password($this->get_value(), |
148 |
$this->_fepassword->get_value())) { |
$this->_fepassword->get_value())) { |
149 |
$this->set_error_message( $v->get_error_message() ); |
$this->set_error_message( $_FormValidation->get_error_message() ); |
150 |
return FALSE; |
return FALSE; |
151 |
} |
} |
152 |
|
|