Welcome Guest, Not a member yet? Register   Sign In
Getting same set_message error for both the fields
#1

[eluser]quest13[/eluser]
I am getting a error message as "* Password is required" for both field. I am not getting
"* Username is required'" for blank user name.

This is how I put the validation code in my controller
$this->form_validation->set_rules('username','Username','trim|required|min_length[5]|max_length[12]|xss_clean');
$this->form_validation->set_rules('password','Password','trim|required|');
$this->form_validation->set_message('required', '* Username is required');
$this->form_validation->set_message('required', '* Password is required');

if ($this->form_validation->run() == FALSE)
{
$this->template->load('/admin/login_template', '/admin/adminlogin_view', $data,'' );
//$this->template->load('/admin/template', '/admin/adminlogin_view', $data,'' );
}
else
{...
...

}
}


Messages In This Thread
Getting same set_message error for both the fields - by El Forum - 06-21-2009, 11:34 PM
Getting same set_message error for both the fields - by El Forum - 06-21-2009, 11:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB