Welcome Guest, Not a member yet? Register   Sign In
Form_validation help!
#6

[eluser]Rogier[/eluser]
I even tried this:

Code:
public function validate() {
        
        $this->form_validation->set_error_delimiters('<div class="error">', '</div>');

        $this->form_validation->set_rules('sub_name', 'Subscriber name', 'trim');

        $this->form_validation->set_rules('sub_email', 'Subscriber email', 'trim|required|valid_email|callback_check_subscribers');
        
        if ($this->form_validation->run() == FALSE) {
            
            return FALSE;
                        
        } else {

            return TRUE;

        }
        
    }

public function check_subscribers($mail) {
      
        $this->form_validation->set_message('check_subscribers', 'it can not be this email address');
        return FALSE;
        
    }

And still... It returns a true when email is valid.. It should return a false because i set the callback to false...


Messages In This Thread
Form_validation help! - by El Forum - 12-23-2010, 04:51 PM
Form_validation help! - by El Forum - 12-23-2010, 10:48 PM
Form_validation help! - by El Forum - 12-23-2010, 11:06 PM
Form_validation help! - by El Forum - 12-24-2010, 01:42 AM
Form_validation help! - by El Forum - 12-24-2010, 01:55 AM
Form_validation help! - by El Forum - 12-24-2010, 01:59 AM
Form_validation help! - by El Forum - 12-24-2010, 02:25 AM
Form_validation help! - by El Forum - 12-24-2010, 03:49 AM
Form_validation help! - by El Forum - 12-24-2010, 03:54 AM
Form_validation help! - by El Forum - 12-24-2010, 04:01 AM
Form_validation help! - by El Forum - 12-24-2010, 04:07 AM
Form_validation help! - by El Forum - 12-24-2010, 04:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB