Index: branches/fundraising/extensions/DonationInterface/gateway_common/GatewayForm.php |
— | — | @@ -128,7 +128,7 @@ |
129 | 129 | * - address - Validates: street, city, state, zip |
130 | 130 | * - amount - Validates: amount |
131 | 131 | * - creditCard - Validates: card_num, cvv, expiration and sets the card |
132 | | - * - email - Validates: email - NOTE: part of this validation is disabled |
| 132 | + * - email - Validates: email |
133 | 133 | * - name - Validates: fname, lname |
134 | 134 | * |
135 | 135 | * @return 0|1 Returns 0 on success and 1 on failure |
— | — | @@ -304,10 +304,6 @@ |
305 | 305 | /** |
306 | 306 | * Validates an email address. |
307 | 307 | * |
308 | | - * @todo |
309 | | - * - is this a bug? isEmail -> email :: This is fixed in this method. |
310 | | - * |
311 | | - * |
312 | 308 | * @param array $data Reference to the data of the form |
313 | 309 | * @param array $error Reference to the error messages of the form |
314 | 310 | * |
— | — | @@ -317,20 +313,20 @@ |
318 | 314 | |
319 | 315 | if ( empty( $data['email'] ) ) { |
320 | 316 | |
321 | | - $error['email'] = "**" . wfMsg( $gateway_identifier . '_gateway-error-emailAdd' ) . "**<br />"; |
| 317 | + $error['email'] = wfMsg( $gateway_identifier . '_gateway-error-email-empty' ); |
322 | 318 | |
323 | 319 | $this->setValidateFormResult( false ); |
324 | 320 | } |
325 | 321 | |
326 | | -// // is email address valid? |
327 | | -// $isEmail = User::isValidEmailAddr( $data['emailAdd'] ); |
328 | | -// |
329 | | -// // create error message (supercedes empty field message) |
330 | | -// if ( !$isEmail ) { |
331 | | -// $error['emailAdd'] = wfMsg( $this->adapter->getIdentifier() . '_gateway-error-msg-email' ); |
332 | | -// |
333 | | -// $this->setValidateFormResult( false ); |
334 | | -// } |
| 322 | + // is email address valid? |
| 323 | + $isEmail = User::isValidEmailAddr( $data['email'] ); |
| 324 | + |
| 325 | + // create error message (supercedes empty field message) |
| 326 | + if ( !$isEmail ) { |
| 327 | + $error['email'] = wfMsg( $this->adapter->getIdentifier() . '_gateway-error-msg-email' ); |
| 328 | + |
| 329 | + $this->setValidateFormResult( false ); |
| 330 | + } |
335 | 331 | } |
336 | 332 | |
337 | 333 | /** |