Welcome Guest, Not a member yet? Register   Sign In
Validation callback not called...
#4

[eluser]dynZack[/eluser]
It looks like notdefault method is not found by the Form_validation library

Line 581 added die() if callback method not found

Code:
// Call the function that corresponds to the rule
            if ($callback === TRUE)
            {
                if ( ! method_exists($this->CI, $rule))
                {        
                    die ($rule); // <<--- outputs notdefault
                    continue;
                }
                
                // Run the function and grab the result
                $result = $this->CI->$rule($postdata, $param);

                // Re-assign the result to the master data array
                if ($_in_array == TRUE)
                {
                    $this->_field_data[$row['field']]['postdata'][$cycles] = (is_bool($result)) ? $postdata : $result;
                }
                else
                {
                    $this->_field_data[$row['field']]['postdata'] = (is_bool($result)) ? $postdata : $result;
                }
            
                // If the field isn't required and we just processed a callback we'll move on...
                if ( ! in_array('required', $rules, TRUE) AND $result !== FALSE)
                {
                    continue;
                }
            }


Messages In This Thread
Validation callback not called... - by El Forum - 11-26-2010, 03:10 PM
Validation callback not called... - by El Forum - 11-26-2010, 03:13 PM
Validation callback not called... - by El Forum - 11-27-2010, 01:21 AM
Validation callback not called... - by El Forum - 11-27-2010, 01:36 AM
Validation callback not called... - by El Forum - 11-27-2010, 02:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB