Welcome Guest, Not a member yet? Register   Sign In
[RESOLVED] Issue with validation + coolfactor's View library (I'm a retard)
#2

[eluser]awpti[/eluser]
Other info:

Here's the 'index':

Code:
function index()
{
  // This only renders the form.
  $this->view->part('header', 'tpl/header');
  $this->view->part('footer', 'tpl/footer');
  $this->view->load('add_job');
}

And the validation:

Code:
function validate()
{
    $this->view->part('header', 'tpl/header');
    $this->view->part('footer', 'tpl/footer');
    // Set the validation rules.
    $rules = array
    (
           'location'              => '',
           'email'                 => 'required|valid_email',
           'job_title'             => '',
           'description'           => '',
           'to_apply'              => ''
    );

    $this->validation->set_rules($rules);
    if ($this->validation->run() == FALSE)
    {
           $this->load->view('add_job');
    }
    else
    {
           $this->load->view('job_accepted');
    }
}


Messages In This Thread
[RESOLVED] Issue with validation + coolfactor's View library (I'm a retard) - by El Forum - 07-10-2008, 11:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB