PHP Classes

Captcha plugin duplicates validation error messages

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  How to Show Google Ma...  >  All threads  >  Captcha plugin duplicates validation...  >  (Un) Subscribe thread alerts  
Subject:Captcha plugin duplicates validation...
Summary:ShowAllErrors true duplicates Captcha validation error messages
Messages:7
Author:Form Class
Date:2007-11-04 22:15:24
Update:2011-02-01 13:39:56
 

  1. Captcha plugin duplicates validation...   Reply   Report abuse  
Picture of Form Class Form Class - 2007-11-04 22:15:24
Manuel,

Line 3319:

- elseif($this->ShowAllErrors)
+ elseif($this->ShowAllErrors && $error != $input_error)
$error.=$this->end_of_line.$input_error;


Without the above fix, error messages are repeated twice.

Regards,

  2. Re: Captcha plugin duplicates validation...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-11-06 23:34:17 - In reply to message 1 from Form Class
What do you mean by duplicating errors? When does that happen?

  3. Re: Captcha plugin duplicates validation...   Reply   Report abuse  
Picture of Form Class Form Class - 2007-11-07 06:34:22 - In reply to message 2 from Manuel Lemos
Manuel,

For instance, when the image validation text has expired, Validate() returns the following error message:

The image-validation text has expired! The image-validation text has expired!


In case of incorrect image text, Validate() returns:

Incorrect image-validation text! Incorrect image-validation text!


Applying the suggested fix resolves this problem.

HTH

  4. Re: Captcha plugin duplicates validation...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-11-07 07:02:56 - In reply to message 3 from Form Class
I am not able to reproduce the problem. Can you provide a small example script?

  5. Re: Captcha plugin duplicates validation...   Reply   Report abuse  
Picture of Form Class Form Class - 2007-11-07 07:22:11 - In reply to message 4 from Manuel Lemos
Manuel,

This is happening if:

form->ShowAllErrors is set to true


HTH

  6. Re: Captcha plugin duplicates validation...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-11-13 01:57:49 - In reply to message 5 from Form Class
I tried setting ShowAllErrors variable to 1 in the test_captcha_input.php example script but I still am not able to reproduce the problem.

Please provide a minimal example that demonstrates that the problem is in the class and not something specific to your environment.

  7. Re: Captcha plugin duplicates validation...   Reply   Report abuse  
Picture of stew biff stew biff - 2011-02-01 13:39:56 - In reply to message 6 from Manuel Lemos
Post is of excellent quality and great to read
http://casinomeilleur.org