CodeIgniter Forums
callback feature on form validation library - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: callback feature on form validation library (/showthread.php?tid=13915)



callback feature on form validation library - El Forum - 12-11-2008

[eluser]Unknown[/eluser]
Hi,
The 'callback' feature on the form validation library does not seem to work.

I have tried everything but the below won't work. Can someone please help? Sad



Code:
class Myform extends MY_Controller {

    function Myform()
    {
        parent::MY_Controller();
        $this->load->helper(array('form', 'url'));
        $this->load->library('form_validation');
    }

    function index() {    
        $this->form_validation->set_rules('datecreated', 'datecreated', 'callback_date_check');
        $this->form_validation->set_error_delimiters('<li>', '</li>');

        if ($this->form_validation->run() == FALSE) {
            $this->display('upload/index', $data);
        }

    }

    function date_check($str) {        
        echo "functionm called";
        exit;
    }



callback feature on form validation library - El Forum - 12-11-2008

[eluser]Phil Sturgeon[/eluser]
Please do not double post on these forums, it tends to make your posts less likely to be answered.