Welcome Guest, Not a member yet? Register   Sign In
$this->form_validation->error_array() not work
#1

please help, i'll try this code in my localhost is working but not in may hosting server.

PHP Code:
public function register() {
         
$this->load->library('form_validation');
           
$this->output->set_content_type('application_json');
           
$this->form_validation-set_rules('name','UserName','required|min_length[4]|max_length[16]|is_unique[user.username]');
           if (
$this->form_validation->run() == false){
               
$this->output->set_output(json_encode([$this->form_validation->error_array()]));
               return 
false;
           }
  } 
www.arthnugraha.com
Learning by doing
Reply


Messages In This Thread
$this->form_validation->error_array() not work - by artha.nugraha - 12-11-2014, 03:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB