Welcome Guest, Not a member yet? Register   Sign In
form problem - unable to display error messages
#1

[eluser]webdude[/eluser]
For some reason when my validation == FALSE and I try to display <?=$this->validation->error_string; ?> on my page it does not diplay.


In my control I have the following:
Code:
<?php

    class Product_details  extends Controller {
    
        function Product_details()
        {
                parent::Controller();
                $this->load->helper(array('form', 'url'));
                $this->load->library('validation');                
        }
        
        function index()
        {
    
        }
        
        function productdetails()
        {            
                
        }
        
        function add()
        {
            $rules['qty'] = "numeric";
            
            $this->validation->set_rules($rules);
                
            if ($this->validation->run() == FALSE)
            {
                $this->load->view('product_details_view');
            }
            else
            {
                //$this->load->view('formsuccess');
                echo "success";
            }                
            
        }    
            
    }
?>
In my view I have the following:
Code:
<?=$this->validation->error_string; ?>

Thanks in advance


Messages In This Thread
form problem - unable to display error messages - by El Forum - 08-09-2007, 03:05 AM
form problem - unable to display error messages - by El Forum - 08-09-2007, 03:20 AM
form problem - unable to display error messages - by El Forum - 08-09-2007, 04:25 AM
form problem - unable to display error messages - by El Forum - 08-09-2007, 05:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB