ajax - kohana validate orm in modal window -


i have controller action this:

public function action_add() {     $this->template->content = view::factory('frontend/content/add_video')             ->bind('video', $video)             ->bind('errors', $errors);     $video = new model_video();     if ($this->request->post()) {         $video->values($this->request->post(), array('source', 'title', 'description'));         try {             $video->save();         } catch (orm_validation_exception $e) {             $errors = $e->errors('video');         }     } } 

the view action displayed in modal window. window openen jquery. when form validated displayed on reguler window, not in modal window. how form valdates in modal? should use ajax call work? please help.

try use ajax, return only:

    if($this->request->is_ajax()) {         echo view::factory('frontend/content/add_video')             ->bind('video', $video)             ->bind('errors', $errors);        exit;     } 

Comments