• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Form_validation isn't using rules from config file (CI2)

#2
[eluser]InsiteFX[/eluser]
Try this: Also make sure you are loading the Form_Validation libray!

Code:
public function save()
{
    // you do not need to pass in people/save it knows it!
    if ($this->form_validation->run() == FALSE)
    {
        if (is_numeric($this->input->post('person_id')))
        {
            $this->edit();
        }
        else
        {
            $this->add();
        }
    }
    else
    {
        redirect('people'); // test to see if it's passing validation
    }

} // save

InsiteFX


Messages In This Thread
Form_validation isn't using rules from config file (CI2) - by El Forum - 01-16-2011, 07:48 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.