Welcome Guest, Not a member yet? Register   Sign In
Matchbox & CI 1.7 Working Form Validation
#7

[eluser]DyaGa[/eluser]
[quote author="philpalmieri" date="1226278717"]
I'm not sure why it's only affecting the form_validation, but it is.
[/quote]

Please, look in form_helper.php function &_get_validation_object()
Code:
function &_get_validation_object()
    {
        $CI =& get_instance();

        // We set this as a variable since we're returning by reference
        $return = FALSE;

        if ( ! isset($CI->load->_ci_classes) OR  ! isset($CI->load->_ci_classes['form_validation']))
        {
            return $return;
        }
[...some code...]
    }

with Matchbox 0.9.4 the result of code
Code:
isset($CI->load->_ci_classes['form_validation'])

is FALSE. So, the returning validation object reference is FALSE.

That's why
Code:
function validation_errors($prefix = '', $suffix = '')
    {
        if (FALSE === ($OBJ =& _get_validation_object()))
        {
            return '';
        }

        return $OBJ->error_string($prefix, $suffix);
    }

and

Code:
function form_error($field = '', $prefix = '', $suffix = '')
    {
        if (FALSE === ($OBJ =& _get_validation_object()))
        {
            return '';
        }

        return $OBJ->error($field, $prefix, $suffix);
    }

returns an empty string...

It seems that http://page12.com/ci/Loader.php.txt temporary solves this problem... Let's wait for new Matchbox version.


Messages In This Thread
Matchbox & CI 1.7 Working Form Validation - by El Forum - 11-02-2008, 11:56 PM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 11-03-2008, 01:52 AM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 11-08-2008, 04:39 PM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 11-09-2008, 12:58 PM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 11-10-2008, 09:11 AM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 12-10-2008, 07:46 PM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 01-20-2009, 03:44 PM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 01-22-2009, 10:52 AM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 01-26-2009, 10:54 PM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 01-27-2009, 09:33 PM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 03-17-2009, 06:35 PM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 03-18-2009, 03:06 PM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 03-19-2009, 10:21 AM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 06-18-2009, 08:41 AM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 07-08-2009, 05:44 PM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 03-14-2010, 08:26 PM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 03-04-2011, 02:27 PM
Matchbox & CI 1.7 Working Form Validation - by El Forum - 05-28-2011, 10:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB