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

[eluser]mathgl67[/eluser]
I think the error variable should be set before building the error message. Else the error variable will be set with the text define in set_fields().

Code:
// Set the error variable name.  Example: $this->username_error
        $error = $field.'_error';
        
        // Build the error message
        $field = ( ! isset($this->_fields[$field])) ? $field : $this->_fields[$field];
        $message = sprintf($line, $field);
        
        // Set the error variable.
        $this->$error = $this->_error_prefix.$message.$this->_error_suffix;
        
        // Add the error to the error array
        $this->_error_array[] = $message;


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