47 |
|
|
48 |
|
|
49 |
/** |
/** |
50 |
|
* return a string to the user for the |
51 |
|
* confirmation page |
52 |
|
* |
53 |
|
* @return string |
54 |
|
*/ |
55 |
|
function get_element_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; |
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 |
|
|