Welcome Guest, Not a member yet? Register   Sign In
isset/required validation bug
#3

[eluser]mathgl67[/eluser]
i have a litle patch for this issue. i don't know if it's fixing the whole problem.

Code:
diff -r 680e129277f9 -r 114fcf6410d5 system/libraries/Validation.php
--- a/system/libraries/Validation.php    Wed Aug 22 15:27:55 2007 +0200
+++ b/system/libraries/Validation.php    Wed Aug 22 15:33:28 2007 +0200
@@ -227,9 +227,13 @@ class CI_Validation {
                     {
                         $line = $this->_error_messages['isset'];
                     }
-                    
+
+                    // Set errors variables.
+                    $error = $field.'_error';
                     $field = ( ! isset($this->_fields[$field])) ? $field : $this->_fields[$field];
-                    $this->_error_array[] = sprintf($line, $field);    
+                    $message = sprintf($line, $field);
+                    $this->_error_array[] = $message;
+                    $this->$error = $this->_error_prefix.$message.$this->_error_suffix;
                 }
                        
                 continue;
@@ -732,4 +736,4 @@ class CI_Validation {

}
// END Validation Class
-?>
\ No newline at end of file
+?>


Messages In This Thread
isset/required validation bug - by El Forum - 08-21-2007, 05:06 PM
isset/required validation bug - by El Forum - 08-21-2007, 05:51 PM
isset/required validation bug - by El Forum - 08-22-2007, 08:19 AM
isset/required validation bug - by El Forum - 08-22-2007, 08:51 AM
isset/required validation bug - by El Forum - 08-22-2007, 10:04 AM
isset/required validation bug - by El Forum - 08-22-2007, 11:56 AM
isset/required validation bug - by El Forum - 08-29-2007, 03:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB