dddd10
چهارشنبه 08 دی 1395, 09:00 صبح
میخوام وقتی فرم ویرایش را خالی ثبت میکنند خطا بده و به صفحه ویرایش برگرده تا کاربر خطارا ببینه. کد زیر مشکل داره میتونید اصلاح کنید ؟
public function check_edit(){
$id = $this->uri->segment('3');
$this->form_validation->set_rules('subject','Subject','required|xss_clean' );
$this->form_validation->set_rules('content','Content','required|xss_clean' );
if($this->form_validation->run() == FALSE){
// $this->template->load('news/edit_news/2');
}else{
}
public function check_edit(){
$id = $this->uri->segment('3');
$this->form_validation->set_rules('subject','Subject','required|xss_clean' );
$this->form_validation->set_rules('content','Content','required|xss_clean' );
if($this->form_validation->run() == FALSE){
// $this->template->load('news/edit_news/2');
}else{
}