Commit 2665ea79 by Bojan Borovcanin

three more

parent c47d6628
Showing with 2 additions and 3 deletions
...@@ -69,7 +69,7 @@ class User extends CI_Controller{ ...@@ -69,7 +69,7 @@ class User extends CI_Controller{
public function signUp(){ public function signUp(){
$this->form_validation->set_rules('firstname','Firstname','required|max_length[30]'); $this->form_validation->set_rules('firstname','Firstname','required|max_length[30]');
$this->form_validation->set_rules('lastname','Lirstname','required|max_length[30]'); $this->form_validation->set_rules('lastname','Lastname','required|max_length[30]');
$this->form_validation->set_rules('gender','Gender','required'); $this->form_validation->set_rules('gender','Gender','required');
$this->form_validation->set_rules('username','Username','required|min_length[6]|max_length[30]|callback_username_is_unique'); $this->form_validation->set_rules('username','Username','required|min_length[6]|max_length[30]|callback_username_is_unique');
$this->form_validation->set_rules('email','Email','required|valid_email|max_length[30]|callback_email_is_unique'); $this->form_validation->set_rules('email','Email','required|valid_email|max_length[30]|callback_email_is_unique');
...@@ -136,8 +136,7 @@ class User extends CI_Controller{ ...@@ -136,8 +136,7 @@ class User extends CI_Controller{
if (preg_match('#[0-9]#', $str) && preg_match('#[a-zA-Z]#', $str)) { if (preg_match('#[0-9]#', $str) && preg_match('#[a-zA-Z]#', $str)) {
return TRUE; return TRUE;
} }
$this->form_validation->set_message(' $this->form_validation->set_message('password_check',
password_check',
'Password have to be a combination of letters and numbers'); 'Password have to be a combination of letters and numbers');
return FALSE; return FALSE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment