Witam
dlaczego nie dziala walidacja formularza , robie wedlug dokumentacji, czy cos jeszcze moze trzeba ustawic ?
tak wyglada widok
<html> <head> <title>My Form</title> </head> <body> <?php echo validation_errors(); ?> <?php echo form_open('form'); ?>Username
<input type="text" name="username" value="" size="50" />Password
<input type="text" name="password" value="" size="50" />Password Confirm
<input type="text" name="passconf" value="" size="50" />Email Address
<input type="text" name="email" value="" size="50" />a tak controller
class Form extends CI_Controller {
public function index()
{
$this->load->helper(array('form', 'url'));
$this->load->library('form_validation');
$this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[5]|max_length[12]');
$this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[8]');
$this->form_validation->set_rules('passconf', 'Password Confirmation', 'trim|required|matches[password]');
$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');
if ($this->form_validation->run() == FALSE)
{
$this->load->view('welcome');
}
else
{
$this->load->view('formsuccess');
}
}
}