Welcome Guest, Not a member yet? Register   Sign In
Validation errors and rules issue
#5

[eluser]Wonder Woman[/eluser]
Yes sure, the code for the controller is:

Code:
function Property_Manager()
{
   parent::Controller();
   $this->load->helper(array('form', 'url'));
   $this->load->library('validation');
}

function index()
{
   // form validation
   $rules['address'] ="required";
   $rules['postcode'] ="required";
   $this->validation->set_rules($rules);
            
   // repopulate the form
   $fields['address'] = $this->input->post('address');
   $fields['postcode'] = $this->input->post('postcode');
   $this->validation->set_fields($fields);
            
   // check to see if form has been submitted
   if($this->validation->run()==FALSE){
   }
   else {
   }
  
   // load the view
   $this->load->view('property_manager_view');
}

Thanks for helping. Smile


Messages In This Thread
Validation errors and rules issue - by El Forum - 07-27-2010, 02:47 AM
Validation errors and rules issue - by El Forum - 07-27-2010, 04:44 AM
Validation errors and rules issue - by El Forum - 07-27-2010, 04:55 AM
Validation errors and rules issue - by El Forum - 07-27-2010, 05:50 AM
Validation errors and rules issue - by El Forum - 07-27-2010, 05:57 AM
Validation errors and rules issue - by El Forum - 07-27-2010, 06:08 AM
Validation errors and rules issue - by El Forum - 07-27-2010, 06:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB