Welcome Guest, Not a member yet? Register   Sign In
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



Theme © iAndrew 2016 - Forum software by © MyBB